Is it possible to create a totally new Android project?


#1

Hello all,

I have a question after I read guide in Cocos2d-x. Is it possible to create a totally new Android project? I mean create new one, not build available samples in cocos2d-x. When I run create_project.py, it produces many supported platforms. However, it just runs the Hello sample.

  • How can I import resources to the new project?
  • How can I implement classes to the new project, which language I can use? (C++, script or something). When I open the android.proj. It has a Classes folder. What can I do with it?

I spent a lot of time to search on Google but they just guide how to build the available sample which Cocos2d-x gave such as HelloCpp, SimpleGame instead create a new one. I need to create a new one, not build.

Thank for advance!


#2

You can reference the this site. http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started
You can make android project with other platforms and program code in Xcode(mac) or VS (win).
When you create project then you can see there is three folders(Classes,proj.android,Resources).
You can add resource files to the resource folder and source code to the Classes folder , also you can modify android.mk file in proj.android folder so you can describe the added class informations.
After that you can compile by running the build_native.sh…
Also you can use the site also.
http://stackoverflow.com/questions/10711047/the-completest-cocos2d-x-tutorial-guide-list
It is complete guide sites for learning cocos2d-x.
:wink:


#3

Well, I’m developing in Windows 7. It means I HAVE TO create a Visual Studio project. Then, I convert it to Android. Right? I check the link [[http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started ]] and followed its instruction. However, I don’t have X-Code, so I got stuck :frowning:


#4

It was so easy to clone HelloCpp