We all know that cocos2d-x is a cross-platform game engine, but if we only use it to develop iPone/iPad-side games, it's a bit too cool, if that's the case, cocos2d-x did not show its advantages. Then I will introduce how to use cocos2d-x to create an Android platform and successfully convert the ios game project into an android game. Operation Procedure: Input pico in the interrupt. when bash_profile is enabled, enter export ANDROID_SDK_ROOT =/Users/Himi/Documents/HimiWork/AndroidTools/android-sdk $ export sources =/Users/Himi/Documents/HimiWork/AndroidTools/android-ndk $ export COCOS2DX_ROOT =/Users/Himi/Documents/cocos2d-1.0.1-x-0.12.0export NDK_ROOT =/Users/Himi/Documents/HimiWork/AndroidTools/android-ndk-r7bexport PATH = $ PATH: $ ANDROID_SDK_ROOTexport PATH = $ PATH: $ ANDROID_NDK _ ROOT, press Ctrl + X-> Y + enter to end the path configuration and create an xcode project. After adding a new class, make sure that all the class files are in the class, then recompile to make sure that the project works normally in the iPhone simulator followed by running cocos2d-x in the terminal, creating a project, project name com. dxw. test, select id2, and then file name test. Then set proj. in android, change build_native.sh to the path .. /.. /modify it .. /libs, and then copy the four files to your project libs. Some files need to be overwritten. Finally, let's take a look at whether the last java/libs in the platform project contains many java files. If not, find the corresponding file from the cocos2d-x and copy it. If it is an additional project created by yourself: to modify the mk file under jni: Set LOCAL_SRC_FILES: = hellocpp/main. cpp ..., add the cpp files in all projects to the proj. andorid to clear, delete the assert and obj files, and then continue. /build_native.sh: import the files to the project, and import them to proj. android is followed by the libcocos2dx file, and then plug in the mobile phone to run it!