How to create a new Android project

How to create a new Android project
0.0 0


Hello all,

I’m a newbie in Cocos2d-x. I read instruction to build samples and did successfully. However, I want to create my own project which can be able to run on Android. Can you give me a detail tutorial such as how to create project, how to implement classes, resources, etc.

In addition,I’m developing in Windows 7, and I can’t setup X-Code like this tutorial. Are there any other solutions?

Thank you so much


You can run this script
It’s in your cocos2d-x/tools/project-creator/
Type ./ enter, then this script will print help for you.


I did, but how I can implement resource such as images, sound, font, etc with Eclipse?
Moreover, I also want to create my own class in Eclipse but it’s unable.
My main question is “Can I develop directly in Eclipse for Android?”


Hello Zhe Wang,

I downloaded cocos2dx 2.2.1 and there is already I just want to let you know that i use python 3 so the print “blabla” statement gave me errors.

After i changed it to print(“blabla”), now it gives me an error :
Traceback (most recent call last):
File “”, line 195, in
File “”, line 161, in processPlatformProjects
replaceString(proj_path + dst, context[“src_package_name”], context[“dst_pac
File “”, line 111, in replaceString
if src_string in line:
TypeError: Type str doesn’t support the buffer API


should i change the script into the one in github?
i noticed there are also differences in json files. which one should i use? the github one or the one from 2.2.1?