- Install the JDK, the step online too much, no longer repeat;
- Install NDK, the same, go directly to Google to find the latest ndk, download the extract to a disk descriptor directory;
- For simplicity, using ADT bundles instead of using Eclipse's native packages saves you a lot of trivial and unnecessary work;
- Go to www.python.org Download the latest version of Python for 2.7.x, and install it, and remember to check the path of Python into path environment variable;
- Download a COCOS2DX 3.x version, I use here is 3.1.1, and unzip;
- Set the following environment variables in Windows:
- Cocos_console_root; This path is set to COCOS2DX 3.x cocos.py directory, usually in the Tools\cocos2d-console\bin directory;
- Ndk_root; This path is the directory location of the ndk just unzipped;
- Android_sdk_root; This setting is the SDK directory after the ADT bundle is unpacked;
- Remember to check that the Python directory is in the environment variable;
- Java_home; This environment variable is set to the bin directory of the JDK, there are many explanations on the Internet;
- Open cmd, enter Cocos new project name-P package name-L cpp-d Project target location;
- Open eclipse in the ADT Bundle, and import the project you just used Cocos new, remember to import the Proj.android directory of the project;
- After you import the project, it is very likely that the project does not contain libcocos2d, which is stored in the COCOS_ROOT\COCOS\PLATFORM\ANDROID\JAVA\SRC directory, which may require manual repositioning yourself.
- Then there is the possibility that the compiler reports that Java @override problem, this should be installed JDK version is not 1.6 version, need to manually set to 1.6 version, it is correct.
Windows Environment builds COCOS2DX 3.x eclipse environment