1. Installing the JDK
2. Install Eclipse, Android official now does not provide eclipse for Android, had to configure itself. First install an Eclipse, install ADT in Help--install New software, with the address http://dl-ssl.google.com/android/eclipse
It may take a long wait.
3. Create an AVD. According to http://www.cocos2d-x.org/boards/6/topics/12563, you need to install 4.0.3 or more virtual machines.
4. Importing the Proj.android project into eclipse will automatically compile and wait a few minutes.
When the compilation is complete, an error message appears, and the error message disappears when you copy the Org and COM folders from the project--COCOS2D--COCOS--PLATFORM--ANDROID--JAVA--SRC to the current project.
5. When the virtual machine is running, another error is encountered:
Java.lang.IllegalArgumentException:No configs Match Configspec
Workaround:
① <uses-feature android:glesversion= "0x00020000" > in Androidmainfest file to
<uses-feature android:glesversion= "0x00020000" android:required= "true"/>
② in the \samples\android-16\apidemos\src\com\example\android\apis\graphics in the ANDROID-SDK installation directory
Gles20activity.java method in the DetectOpenGLES20, modified to
Import android.os.Build; Private Boolean detectOpenGLES20 () { = (activitymanager) Getsystemservice (context.activity_service); = Am.getdeviceconfigurationinfo (); return (info.reqglesversion >= 0x20000 | | Build.FINGERPRINT.startsWith (' generic ')); }
③ Check the use Host GPU in the AVD settings
6. Finally normal operation! Another: In manifest modified to android:screenorientation= "portrait" can be set as a vertical screen, the default is a horizontal screen.
Cocos2d-x 3.x how to compile cheer Android program