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