COCOS2DX version 3.10 compiled Android error

Source: Internet
Author: User

Environment:

JAVA-SDK 1.7

Python2.7

cocos2dx-3.10

Lua5.1

vc++2005-2013

Ant 1.10.1

android-ndk-r10d

1. Error

C + + compilation completed, error generating APK package

2. Resolution process

2.1 Originally suspected disk problems, format disk/repair Disk bad word also useless, try several machines have the same error, troubleshooting disk problems.

2.2 Manually compile with Cocos command line, compile successfully, presumably a bug that Python executes the cmd command

2.3 Find build_android.py view py execute cmd command to generate the line of APK

Modify the execution, or report the same volume label error, again think may be the py version problem, replaced by PY2.7.14, do not report the volume label error, but the new error occurred, ant error

2.4 Troubleshooting Ant Errors

Environmental inspection:

Android_sdk

C:\Android\sdk\adt\sdk\platforms; C:\Android\sdk\adt\sdk\platform-tools; C:\Android\sdk\adt\sdk\tools

Android_sdk_root

C:\Android\sdk\adt\sdk

Ant_home

C:/android/ant

Java_home

C:/android/jdk1.7.0_80

CLASSPATH

.; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar

A lot of information on the Internet,

Typical solutions are:

1.

Ant_home=c:/android/ant/bin

path=%java_home%\bin;%ant_home%;

CMD Input ant-h report ant_home not set

2.

Ant_home=c:/android/ant

Path=%java_home%\bin;%ant_home%\bin;

CMD Input Ant-h Report Java Main method exception

The above 2 methods have many people to adopt, said can solve smoothly,

Finally guess Ant called its lib below the jar package, in path to quote

%java_home%\bin;%ant_home%\lib;%ant_home%\bin;

CMD input ant-h normal.

2.5 Compile and build apk

2.6 Supplement

You can also copy all the contents of the Lib and bin directories under the ant directory into the ant directory

path=%java_home%\bin;%ant_home%;=

Path doesn't need to write%ant_home%\lib;%ant_home%\bin.

COCOS2DX version 3.10 compiled Android error

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.