Cocos2dx3.1-build an initial experience in the Android Environment

Source: Internet
Author: User

Cocos2dx for the first time.

It seems that there are great differences between versions. Compared with the previous versions, 3. X is easier to use and more convenient.

1. Install python. My python-2.7.3. Configure Environment Variables

In the system variable: Add D: \ 2013 \ python \ Python27 to the Path.


2. Install ant. Apache-ant-1.9.3. Configure Environment Variables

In the system variable: Create a New ANT_HOME (D: \ 2013 \ ant \ apache-ant-1.9.3), and add D: \ 2013 \ ant \ apache-ant-1.9.3 \ bin

In the user variable: Create a New ANT_ROOT (D: \ 2013 \ ant \ apache-ant-1.9.3 \ bin)


3. cocos2dx 3.1.1.

Execute the download-deps.py in sequence, setup. py

Configure NDK_ROOT (D: \ TOOL \ android-ndk-r9d), ANDROID_SDK_ROOT (D: \ TOOL \ android-sdk), ANT_ROOT (D: \ 2013 \ ant \ apache-ant-1.9.3 \ bin)

Pay attention to the ndk version, log out of the host, and execute setup. py again. If the flash passes, the configuration is complete.

4. Create a new project.

Cocos new-p com. xxx. simple-l cpp-d D: \ 2013 \ cocos2dx \ projects simplegame

V. Compilation

1. Command Line Compilation: Enter the project directory through the command line. cocos compile-p android (ant can also be compiled and the command is ant debug)

2. eclipse Compilation: directly import eclipse, which is no different from 2.x. After being imported, you can directly run the compilation. (You do not need to configure this configuration here, which is much easier than 2.x)

I wrote about it and left a message if I don't understand it.


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.