Cocos2d-xforandroid: Ubuntu Environment Construction

Source: Internet
Author: User
After experiencing the power of vim, it seems that a development program does not consciously need this product, and it also tends to develop applications under Ubuntu. I had nothing to do over the weekend. I looked at cocos2d and thought that I had entered the game industry. Therefore, install it. Cocos2d-x engine download click to jump to download or git: // github.com/cocos2d/cocos2d-x.gitafter the download is complete, decompress, to the following directory installation Step 1 open create

After experiencing the power of vim, it seems that a development program does not consciously need this product, and it also tends to develop applications under Ubuntu. I had nothing to do over the weekend. I looked at cocos2d and thought that I had entered the game industry. Therefore, install it.

Cocos2d-x engine download

Click to download or git: // github.com/cocos2d/cocos2d-x.git

After the download is complete, decompress the package and obtain the following directory:

Step 1

Open the create-Android-project.sh script and change NDK_ROOT_LOCAL and ANDROID_SDK_ROOT_LOCAL to the ndk directory and SDK directory corresponding to your system, such

Save the changes.

Run the create-android-project.sh script to generate the android project. Enter the game project package name, project name, and target version to be generated as prompted. This is not described too much.

Step 2

After the code is generated, you will see the project named "project name" in the "cocos2d" directory, for example, "mycocos2d" in the preceding directory. The three directories will be displayed, if the other two directories do not work for the time being, directly go to proj. android directory, as shown in the following list

If you have declared the ndk directory before installing the ndk, you can directly execute the build_native.sh script (provided that the Declaration is marked by NDK_ROOT ). If the statement is not declared, the prompt please define NDK_ROOT is displayed.

Tips: the Declaration is very easy to add and source on. bashrc, or directly export NDK_ROOT = [your target NDK_ROOT].

Whether the verification is successful or not can be like this: cd $ NDK_ROOT, It will be successful if it enters, if it does not enter, Please carefully check whether the path is correct.

Well, let's not talk about it. After completing the above steps, you can directly execute build_native.sh.

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.