COCOS2DX Development (3)--COCOS2DX packaged into Android apk,ant environment setup

Source: Internet
Author: User

In front of the COCOS2DX environment (Android SDK,JDK,), the last COCOS2DX apk packaging environment, the most operational environment plus ant environment is good

1. Ant Download Configuration

Official website Download: http://ant.apache.org/bindownload.cgi

Unzip to your appropriate directory and add the bin of the ant root directory to the environment variable path

This is E:\DevelopTool\AndroidTool\apache-ant-1_9_4\bin.

Reopen the command window, as shown below for success

Open COCOS2DX root directory run download-deps.py and setup.py execute again

The first one should be to download some library files, and finally whether to delete, the author here No

The second if there is not found that directory, manually input to the corresponding directory is available

The main reason is that the name of the environment variable is not cocos inconsistent, ndk_root,android_sdk_root and other environment variable name, see the first article

2. Pack apk

Packaged as an official website example. Go to catalogue cocos2d-x-3.2\cocos2d-x-3.2\tests\cpp-tests

Open a Command window, enter: Cocos compile-p android–-ap 20

If it goes well, go straight to compile.

Note: A GCC error or an error such as NDK no Foun should be the default name and the new NDK in the Cocos program. R10 toolchains file name inconsistency caused by the interruption (you can see the NDK toolchains each file with a version number), afraid of troublesome classmates or installed r9d. Not afraid of trouble or version control can copy r9d Toolchains (not tested, only guess).

To here the environment is almost, COCOS2DX environment compared to do unity3d environment is really a lot of trouble, plug-in is one hand, the name is wrong or the built-in version of the corresponding error is easy.

COCOS2DX Development (3)--COCOS2DX packaged into Android apk,ant environment setup

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.