COCOS2DX Android Packaging Environment configuration installation package download

Source: Internet
Author: User

Install package
The required installation packages are as follows:
Cocos2d-x 3.4, Address Http://cn.cocos2d-x.org/download#anchor2.

Other installation package Baidu download the network disk Link: http://pan.baidu.com/s/1c0hRJig Password: kfzq

Android SDk.
NKD,COCOS2D official recommended use of the r9d version, using r10d will not find Srand function error.
Eclipse, I'm using the latest Luna Standard Edition.
ADT, an ADT environment is required to develop an Android program with Eclipse.
Jdk,java development environment.
AVD arm support, the default Android emulator is not supported by arm, need to download arm image.

1. Installing the JDK
2. Install the Android SDK
3. Installing the NDK
Unzip to the E:\Android directory.
4. Install Eclipse
Unzip directly into any directory.
5. Installing ADT
Run Eclipse and select Help->install New software from the menu.
In the top right corner of the popup dialog box, select Add ... Button.
In the pop-up dialog box, name Enter ADT Plugin, and in archive, select the ADT package to download.

Developer Tools before the next step, the installation will restart eclipse after completion.
After reboot will let choose android SDK path, I here is E:\android\SDK.
At this point, Eclipse's Android environment is installed.
6. Configure Environment Variables
Win+pause Enter environment variable settings
New environment variable: Java_home value: D:\Program files\java\jdk1.7.0
New environment variable: CLASSPATH value is:.; %java_home%\lib; (Note: The dot indicates the current directory and cannot be omitted)
Add the following in front of the value of the system variable path:%java_home%\bin; (note: The semicolon here cannot be omitted) here, the JDK is installed.
New environment variable: ANDROID_SDK value is: E:\ANDROID\SDK
Add the following in front of the value of the system variable path:%android_sdk%
New environment variable: ndk_root value is: E:\android\android-ndk-r9d
Add the following in front of the value of the system variable path:% ndk_root%
Unzip the ant package to the Android directory. environment variable settings: add: D:\Android\apache-ant-1.9.4\bin in Path, input ant-version in DOS environment The following result indicates a successful configuration

7. Create Cocos2d-x Project
Unzip the cocos2d-x-3.4 compressed package you just downloaded into the folder you specified.
Go to directory cocos2d-x-3.4/tools/cocos2d-console/bin/cocos.py
Open Terminal Run cocos.py script Create text

python cocos.pycom.coco2dx.org -l cpp -d E:\cocos\projects

Parameter description: Test for Project name
-P Follow-up package name
-L followed by development language type, with CPP, LUA, JS three types
-D followed by project-hosted directory to generate Android project files

8. Import Android Project
Finally, you can start Eclipse and import the Android project. The procedure is as follows:
Right-click on "Package Explorer" and select "Import ..."
When the dialog box appears, select "Exsiting Android project into Workspace" (the existing Proj. Android Project Import workspace).

The import will automatically execute the build_native.py script to compile. Once the compilation is complete, you can run HelloWorld in the real machine or emulator.
This completes the environment configuration for the entire Cocos2d-x 3.4 release.

Note If you encounter a problem refer to my previous COCOS2DX packaging problem Article COCOS2DX packaging problem Solving method

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

COCOS2DX Android Packaging Environment configuration installation package download

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.