[Independent developer er Cocos2d-x practice 011] Cocos2dx 3. x command line to generate APK details, cocos2d-xapk
Cocos2d-x 3.6 project package to generate apk Android app files, the steps to build the android environment is a bit cumbersome, but once set up, the future will be very fast!
The procedure is as follows:
1. Download the Android environment: the Android SDK, NDK, Ant, and JDK are required to build the Android environment;
Download Android SDK
Download Android NDK
Download Android JDK
Download Ant
JDK needs to be installed, and others can be decompressed directly.
2. Configure the JDK and ANT environment;
Due to the large amount of configuration information on the Internet, the configuration is not described in detail here.
3. Go to the Cocos2dx root directory and run setup. py;
Note 1: To Run. py, You need to configure the python environment. Please download and configure it yourself.
NOTE 2: If the NDK corresponding to Cocos2dx 3.6 requires r9 or above, I use r9d. If you use a android-ndk-r8c, the following issues occur:
LOCAL_SRC_FILES points to a missing file.
We tracked down the r8c path and found that there was no 4.8 directory at all:
If we check the r9 path, we will find that 4.8 exists:
4. Go to the root directory of the new project and run cocos run-p android-j 4:
4. Go to the apk path and install it on the real machine, virtual machine, or simulator (I am using haima play simulator ):
If CocosStudio is developed and used, you can package it directly:
Refer to blog:
Cocos2dx-v3.0 command line Create Project
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.