Cocos2d-x 3.x how to compile cheer Android program

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.