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!
Installing the Java JDK <java Development Kit>java operating environment for the first time, it's best to install a 1.6 version! "Eclipse"
Androna online Download ADT <andrion devilopment tool> Android development tool, after decompression there will be two files, Eclipse and SDK
Androna Web Download NDK
Cocos I use the 3.6 version, Cocos website can be downloaded
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.
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
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