Hello everybody, study today under WIN8 Configuration cocos2d-x development environment, now share it, if there is inaccurate place, please point out, thank you!
Required Software:
vs2012
ADT Bundle (integrated with Eclipse and SDK)
Ant
Ndk
Source Code of Cocos2d-x
Python
First install vs2012, install Python after installation, install Python and add Python directories into environment variables, such as:
In this case, the Python environment variable is configured so that you can execute the python command below the command line to see if it is successful:
After installation, download Cocos2d-x source, enter the directory below to see the following files:, open the command line, switch to the directory below the execution of Python setup.py will be prompted to fill in the path, directly enter the line,
, after the wait is over, reopen the command line to execute Cocos, and the command lines see: it succeeds.
Then download the Android-related software,
Configure the JDK (http://blog.csdn.net/majianjie/article/details/20851593), install it, look at the directory: Add the NDK CDT ant environment variable in the environment variable (like add Python variable), and then use the Cocos new test-p com.mjj.game-l cpp-d workspace command to create a new project, open Eclipse with vs2012 compilation success, and Pro.android Imp for the project Ort in,remember not to tick that option ., when the introduction will appear an exclamation mark, this time right click on the item---"Android, the lower right corner of the red error remove, and then the project \cocos2d\cocos\2d\platform\android\java\ src directory under the Org folder copy to Proj.android\src, overwrite the original folder, this time open org-"cocos2d-x-" below will be more than a Lib folder, and then refresh the project, this time should be no error, you can compile The command line switches to the project directory and executesCocos run-p Win32 command is run with vs2012, executeCocos Compile-p Android is compiled in Android, (this time you may need to performCocos Run-pAndroid--ap 20 will succeed, as if the version of the problem), if your project has a new CPP file, you need to modifyJNI The following android.mk file, add the contents of the CPP file (remember)
Basic is these steps, if there is not thoughtful place, you can contact me, leave a message on the line. Everyone to study together. Good night!