Try cocos2dx 3.1.1

Source: Internet
Author: User

At last, I started to fully invest in cocos2dx development. I have accumulated a lot before, but all of them are based on 2.2.2. the 3.1.1 version also came out for a while. It should be mature. I will try it today. One of the biggest changes is that cygwin is not needed, and ndk is used directly. Select and install python, ant, ndk, and andoroid sdk.
Similarly, set three environment variables, such as ANDROID_SDK_ROOT, ANT_ROOT, and NDK_ROOT, which are somewhat different from the previous ones.
Download cocos2dx 3.1.1 and decompress it. Here I decompress it to G: \ cocos2dx \ cocos2d-x-3.1.1. Run setup. py, which sets the environment for cocos running dependencies. 3.1.1 use \ tools \ cocos2d-console \ bin \ cocos. py to create a project. After you run setup. py, cocos. py is added to the PATH, which can be directly input as a command.
To simplify the creation, I wrote a batch processing name here, which is the project name. To create a batch processing name, you only need to change it. There are no restrictions on the batch processing location. You can change the target directory and package name.
The batch name here is MyTest. bat.
Cocos new % ~ N0-p com. zdhsoft-l cpp-d g: \ cocos2dx \ cocos3
Then press G: \ cocos2dx \ cocos3 \ MyTest \ proj. win32 \ MyTest. sln to compile and run an empty cocos2dx.
Similarly, in G: \ cocos2dx \ cocos3 \ MyTest \ proj. android runs build_native.py, double-click it, and then runs ant debug to get an apk, which can be run on the mobile phone.

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.