COCOS2D-X 3.6 Project Package build apk Android app file, the steps to build an Android environment are a bit cumbersome, but once built, it will be very fast!
The steps are as follows:
Download Android Environment: Android SDK, NDK, Ant and jdk are needed to build Android environment;
Download Android SDK
Download Android NDK
Download Android JDK
Download Ant
where the JDK needs to be installed, the others are directly extracted.
II, configuring JDK and ant environments, etc.
because there is a lot of configuration information on the Web, the configuration is not explained in detail here.
Three, enter the COCOS2DX root directory, and run setup.py;
Note 1: Run. PY requires a Python environment to be configured, download the python2.7 version, and self-configuring.
Note 2:COCOS2DX version 3.6 corresponds to the NDK needs R9 above, I use r9d. If you use ANDROID-NDK-R8C, the following issues occur:
Local_src_files points to a missing file.
We tracked down to the r8c path and found that there were no 4.8 directories at all:
The corresponding we look at the path of the R9, we will find that there are 4.8:
Iv. Enter the root directory of the new project and execute Cocos run-p android-j 4:
< Span style= "FONT-SIZE:14PX; line-height:25.2000007629395px "> Four, enter the APK path, and continue to install to the real machine or virtual machine or simulator ( I'm using Hippocampus play simulator":
< Span style= "FONT-SIZE:14PX; line-height:25.2000007629395px ">
< Span style= "FONT-SIZE:14PX; line-height:25.2000007629395px "> If you develop and use Cocosstudio, you can package it directly:
< Span style= "FONT-SIZE:14PX; line-height:25.2000007629395px ">
< Span style= "FONT-SIZE:14PX; line-height:25.2000007629395px "> Reference blog:
cocos2dx-v3.0 the command line to create a project
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
"Independent Developer ER cocos2d-x combat 011" COCOS2DX 3.x command line build apk detailed