1. Build the cocos2dx 3.2 Environment and 1. Build cocos2dx3.2
1 Required Software
Jdk-7u25-windows-i586.exe
Python-2.7.8.amd64.msi
Cocos2d-x-3.2.zip
Apache-ant-1.9.4.zip
Adt-bundle-windows-x86-20140321.zip
Android-ndk-r9d-windows-x86.zip
:
2. Install jdk and configure related environment variables
Configure java_home
Configure Path
Configure classpath.; % java_home % \ lib \ dt. jar; % java_home % \ lib \ tools. jar
3. Install python
3 unzip the adt-bundle-windows-x86-20140321
4 decompress android-ndk-r9d-windows-x86.zip
5 decompress apache-ant-1.9.4.zip
6 decompression: cocos2d-x-3.2.zip
7 open the cmd command line window, switch to the C: \ cocos2dx \ cocos2d-x-3.2 \ cocos2d-x-3.2 directory, enter setup. py in the command line
8. Configure the environment as prompted: (NDK_ROOT, ANDOIRD_SDK_ROOT, ANT_ROOT)
Copy the path of NKD_ROOT to the following: C: \ cocos2dx \ android-ndk-r9d-windows-x86 \ android-ndk-r9d
Configure the ANDROID_SDK_ROOT path to C: \ cocos2dx \ adt-bundle-windows-x86-20140321 \ sdk
Configure the ANT_ROOT path to C: \ cocos2dx \ apache-ant-1.9.4 \ apache-ant-1.9.4 \ bin (note that the file path must be directed to bin)
\ Bin
9 create and run a project
A. Reopen the terminal.
B. Enter the cocos new project name-l cpp-p com. toto. T32-d to create the project storage location.
C:
Enter the location of the cocos run-s project-p running platform. The optional values include win32, android, ios, mac, and linux]
Enter cocos as follows:
Create a project
Cocos new T32-l cpp-p com. toto. t32-dC: \ cocos2dx \ cocos2d-x-3.2 \ projects \ T32
Project Structure:
Run the project:
Cocos run-SC :\cocos2dx \ cocos2d-x-3.2 \ cocos2d-x-3.2 \ projects \ T32 \ T32-p android