Recently in the construction of COCOS2D environment, the results of various problems, two people get a day to do a good environment! -_-!!
Avoid people may also encounter me this situation, so write an essay, let everyone also understand how to build it ~
1, environmental installation preparation
Download Tadp-xxxx-windows.exe,:https://developer.nvidia.com/tegra-android-development-pack
Praise the Nvidia Lei Feng practice, this installation package integrates all the tools, so that we do not need to download the installation, one-click installation, all done! Note When installing, remember to add Eclipse, default is not added.
2, COCOS2D project generation
D:\cocos2d-x-2.2.3\tools\project-creator\
Execution: Create_project.py-project cocos2dtest-package com.example.cocos2dtest-language CPP (requires installation of python2.7)
A cocos2dtest project will be generated in D:\cocos2d-x-2.2.3\projects\ after the compilation is successful.
3. Eclipse Add Project
Import this Android project: D:\cocos2d-x-2.2.3\projects\Cocos2dTest\proj.android
4. Add Project Reference File
Copy the org under D:\cocos2d-x-2.2.3\cocos2dx\platform\android\java\src\ to d:\cocos2d-x-2.2.3\projects\Cocos2dTest\. Proj.android\src\, you will get the following files in the function directory:
COM and org
5. Eclipse environment variable settings
The like Resources path Variables needs to add a file cocos2dx d:/cocos2d-x-2.2.3
C + + Build
Build command for Builder Settings:
D:\NVPACK\android-ndk-r10c\ndk-build.cmd "need to download NDK"
Environment adding COCOS2DX and Ndk_module_path
cocos2dxd:/cocos2d-x-2.2.3 "cocos2d Version number Path"
Ndk_module_pathd:/cocos2d-x-2.2.3;d:/cocos2d-x-2.2.3/cocos2dx/platform/third_party/android/prebuilt
6, Copy Assets directory file, save assets to d:\cocos2d-x-2.2.3\projects\Cocos2dTest\proj.android\
Now you can try to run your project! :)
Android under cocos2d create HelloWorld Project