Cocos2d-x 2.2.0 - Installation

Hi,

I have been trying to install+set up my eclipse environment with cocos2d-x on Windows with no luck. I try to follow this tutorial:
http://www.cocos2d-x.org/wiki/How_to_set_up_the_android_cocos2d-x_development_environment_on_Windows_7
But in version 2.2.0 of cocos2d-x there is no create-android-project.bat… so I cannot carry on with the tutorial.

Can someone help me?
Thanks in advance.

Hello

I think you can try to run create_project.py from tools/project-creator folder, works for me nice and simple. Script generates project files for all platforms though.

python create-project.py -p MyGame -k com.MyCompany.AwesomeGame -l cpp

— this line will generate folder MyGame in projects folder with proj.win32/android/ios/etc. You can import proj.android in Eclipse from there now.

I was getting strange errors when trying to build project imported that way. They can be solved by importing Eclipse project from cocos2dx/platform/android firstly.

Use “create_project.py” file under cocos2d-x-2.2\tools\project-creator directory also you need to install Python for this. Also check this thread:

Thanks you both, I could continue with the tutorial but now, after running the project_creator, I set the environment variable NDK_ROOT, and I check it by writing: “cd $NDK_ROOT” in the Cygwin terminal, getting the expected result(NDK folder). But when I run build_native.sh from the previously generated project I get “please define NDK_ROOT”.

Thanks in advance

I did not use tutorial you mentioned here. After project generation you can find nice README.md file in projects/GameName/proj.android/. I followed every step in “Setup Eclipse Environment” section and it worked (NDK_ROOT is mentioned there but there is no need to run build_native.sh manually if you are using Eclipse).

Thank you Alexander, now it works! :wink:

Thank you guys. I added a WARNING and link to document of python command line tool in at wiki
[[How to set up the android cocos2d-x development environment on Windows 7#Edit the batch file]]