In front of the COCOS2DX environment (Android SDK,JDK,), the last COCOS2DX apk packaging environment, the most operational environment plus ant environment is good
1. Ant Download Configuration
Official website Download: http://ant.apache.org/bindownload.cgi
Unzip to your appropriate directory and add the bin of the ant root directory to the environment variable path
This is E:\DevelopTool\AndroidTool\apache-ant-1_9_4\bin.
Reopen the command window, as shown below for success
Open COCOS2DX root directory run download-deps.py and setup.py execute again
The first one should be to download some library files, and finally whether to delete, the author here No
The second if there is not found that directory, manually input to the corresponding directory is available
The main reason is that the name of the environment variable is not cocos inconsistent, ndk_root,android_sdk_root and other environment variable name, see the first article
2. Pack apk
Packaged as an official website example. Go to catalogue cocos2d-x-3.2\cocos2d-x-3.2\tests\cpp-tests
Open a Command window, enter: Cocos compile-p android–-ap 20
If it goes well, go straight to compile.
Note: A GCC error or an error such as NDK no Foun should be the default name and the new NDK in the Cocos program. R10 toolchains file name inconsistency caused by the interruption (you can see the NDK toolchains each file with a version number), afraid of troublesome classmates or installed r9d. Not afraid of trouble or version control can copy r9d Toolchains (not tested, only guess).
To here the environment is almost, COCOS2DX environment compared to do unity3d environment is really a lot of trouble, plug-in is one hand, the name is wrong or the built-in version of the corresponding error is easy.
COCOS2DX Development (3)--COCOS2DX packaged into Android apk,ant environment setup