"Independent Developer ER cocos2d-x combat 011" COCOS2DX 3.x command line build apk detailed

Source: Internet
Author: User

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

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.