Cocos2d-x upgrade to 3.4 with Create Android project1 Upgrade Installation Cocos2d-x
Windows7 64-bit machine, download cocos2d-x-3.4 on the website:
Http://www.cocos2d-x.org/filedown/cocos2d-x-3.4.zip
Unzip to the path where the environment variable cocos_x_root is located, setting the following environment variable:
Cocos_x_root=d:\gamedev\cocos\frameworks\cocos2d-x
instead :
cocos_x_root=d:\gamedev\cocos\frameworks\cocos2d-x-3.4
Similarly, in an environment variable, the place where the cocos2d-x appears is replaced with cocos2d-x-3.4 .
2 Installing the eclipse+ndk+android SDK
This is more cumbersome, I use the one-click Nvidia installation package: Tadp-3.0r4-windows.exe
After installation, make sure that the following configuration exists in the environment variables:
3 Creating a Cocos2d-x project
To open the cmd command window:
CD%cocos_x_root%
Python setup.py
Close cmd, and then open. The following actions are similar:
The project has been created. Start compiling below.
4compiling to Android platform
Go to the directory where the project build_native.py, execute the command:
CD C:\workspace1\gamedev\demogame\proj.android
Python build_native.py
Then there is the lengthy compilation process. After the compilation is complete, import the project using Eclipse:
Eclipse->file->import->general/existing Projects into Workspace, select directory:
C:\workspace1\gamedev\demogame\proj.android
The following error will then occur:
Need to right click on the src directory above, click Import
Press the input below and click Finish:
At this point, Cocos2d-x's Android project was created and compiled without errors. Deploy and run the program below!
5 Deploy and run programs to the Android platform
Cocos2d-x upgrade to 3.4 with Create Android project