Ensure that the basic environment is well established:
1. JDK
2. Eclipse
3. SDK
4. NDK
First, import the cocos2dx Sample Project
E:\COCOS2DX directory for cocos2dx
1. import E:\cocos2dx\cocos2d-x-2.2.4\samples\Cpp\SimpleGame into eclipseand Catalog
all Files under E:\cocos2dx\cocos2d-x-2.2.4\cocos2dx\platform\android\java\src ( library file ) copied to src directory, and will E:\cocos2dx\cocos2d-x-2.2.4\samples\Cpp\SimpleGame\Resources all resources in the directory are copied to Assets directory.
2.set eclipse environment variables, add ndk_root and cocos2dx Two variables, the values are as follows
3. There is also a bug not resolved, as follows:
4.modify the project properties and set the build command value under C + + build , as follows
5. Rebuild under Project,Project--build project, and report the following error:
6, the solution, in the jni directory under the android.mk to add the following two sentences
At this point, the environment is done.
Eclipse COCOS2DX Development Environment Building