Build a Cocos Android environment on your Mac

Source: Internet
Author: User

Hello everyone! The first time to write a blog is inappropriate, please point out! A lot of attention

About the Android environment to build! I also studied for a long time, only to understand some!


  1. Installing the Java JDK <java Development Kit>java operating environment for the first time, it's best to install a 1.6 version! "Eclipse"

  2. Androna online Download ADT <andrion devilopment tool> Android development tool, after decompression there will be two files, Eclipse and SDK

  3. Androna Web Download NDK

  4. Cocos I use the 3.6 version, Cocos website can be downloaded

  5. Environment variable configuration open the terminal into the Cocos directory (I am directly dragging the folder to the terminal), execute./setup.py, will pop up a lot of hints follow the prompts, execute Cocos required file path, fire set environment variable export android_ Sdk_root= "Here is the SDK path after you unzip the ADT"

    Export android_ant_root= "path to ANT found in SDK"

    Export ndk_root= "NDK Path"

    Then CD ~ Enter the user's working directory, open the file. Bash_profile View the contents, the content is consistent with the environment variables that you set.

  6. Next, we can create a Cocos project with the input Cocos new will pop up a few tips follow the prompts Cocos new project name-p package name-D path creates a newly created Cocos project

  7. Terminal into the new Cocos project path, perform Cocos run-p Android 4 plug-in phone to form APK installation package on Android device


This article is to be extended, you are welcome to correct

This article from the "11107935" blog, reproduced please contact the author!

Build a Cocos Android environment on your Mac

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.