[Independent developer er Cocos2d-x practice 011] Cocos2dx 3. x command line to generate APK details, cocos2d-xapk

Source: Internet
Author: User

[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.

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.