How to configure the Android environment for Coocs2d-x 3.2 on Win7 and pack the APK

Source: Internet
Author: User

I use the operating system is 64-bit Win7 flagship version of the successful packaging.

Hope to have urgent to see this article, after all, everyone is from rookie to the great God.

Also to prove their own growth process.

The things you need are:

1.java-jdk

2.Python 2.7.* Version

I'm using a python 2.7.3.

3.NDK r9d

4.ANT

5.adt_bundle_android.

Here to mention the adt_bundle_android is actually an eclipse of the Android development environment of the collection, if it will be equipped with the eclipse of the Android environment, you can not. Eclipse's Android environment configuration requires Eclipse, ADT, ANDROID_SDK, and will not be able to go to Baidu. Eclipse's Android environment is also affixed to the back.

6.android_sdk

The SDK can go to the official website.

7.vs2012

Most of the use of Visual Studio know there is a tomato plug-in, and so I will also post it, you follow the instructions to install the line, will save a lot of code time.

Paste the above required software Baidu share: Http://pan.baidu.com/s/1jGIMVau

After the software is ready, install the software and configure the environment.

  The JAVA-JDK is installed first, and the JDK environment is configured after completion.

How to configure the JDK environment: Right-click My Computer, click Properties, locate advanced system settings, and then locate the "Environment variables" open in the "system variables (s)", click "New (W)", "Variable name" input: java_home , "Variable value" input: your JDK installation path . Example: My Java installation path is: D:\SoftwareFiles\Java, then the "Variable value" is:d:\softwarefiles\java\jdk1.8.0_45-> and then all the way OK.

  Then install Python and configure the Python environment after completion

Python environment Configuration method: Right-click My Computer, properties, find "Advanced system settings" and open "environment variables" open----"system variables (s)" to find Path This system variable and open "variable value "Input: The installation path of your Python .

  Unzip Ant and set up your ant environment.

How to configure the ANT environment: Right-click My Computer, click Properties, locate advanced system settings, and then locate the "Environment variables" open in the "system variables (s)", click "New (W)", "Variable name" input:ant_root , the variable value input:The path of the ant .

  Unzip the NDK and set up the NDK environment.

How to configure the NDK environment: Right-click My Computer, click Properties, locate advanced system settings, and then locate the "Environment variables" open in the "system variables (s)", click "New (W)", "Variable name" input:ndk_root , the "Variable value" input:the path of the NDK .

  Unzip the adt_bundle_android and set the SDK environment.

How to configure the SDK environment: Right-click My Computer, click Properties, locate "Advanced system Settings" and open "environment variables" opens in "system variables (s)", click "New (W)", "Variable name" input:android_sdk_ ROOT, "Variable value" input:the path to the SDK (SDK adt-bundle-windows-x86_64-20140321\sdk after adt_bundle_android decompression).

  Install the VS2012 again.

This is nothing to say, the normal installation has the option of all-in-one installation on the line, and finally select the C + + development environment.

  Unzip the cocos2d-x-3.2 again.

cocos2d-x-3.2 unzip the two folders, regardless of the above, use the following one. Then locate setup.py in the cocos2d-x-3.2 folder and double-click Run. If you understand English, you can see if there are any other circumstances that are not well-equipped and then go back to the match.

  Create a new cocos2d-x-3.2 project.

    Navigate to Cocos2d-x-3.2\tools\cocos2d-console\bin here, hold down SHIFT and press the right mouse button, click "Open Command Window Here", and then enter: Cocos space new space Item name space-P space A.B.C ( Must be three path) space-L (this L is L lowercase) Space development language selection (here CPP) space-D space Enter the project storage path when finished press ENTER, wait a while.

  Run the cocos2d-x-3.2 project.

Navigate to: Your project name \proj.win32, and then click: your project name. sln This file, wait for VS2012 to run, press F5 directly, wait until the COCOS2DX logo interface is OK.

Ready to start packing.

  Run: build_native.py.

Navigate to: Your project name \proj.android, find build_native.py and double click to run, wait to finish.

  Package with Eclipse.

1. Navigate to Adt-bundle-windows-x86_64-20140321\eclipse and open Eclipse.exe. The first run will let you define the project run space location for Eclipse, which is defined as your hobby.

2. Then click file->import-> Select Android under existing Android Code into workspace->browse-> your project directory under proj.android OK- Tick on the item you selected and click Next.

3. Then click File->import-> to select Android under existing Android Code into workspace->browse-> cocos2d-x-3.2 directory under Cocos2d-x-3.2\cocos\platform inside Android OK-tick on the item you selected click Next.

4. If an error occurs, copy the Org folder inside the Cocos2d-x-3.2\cocos\platform\android\java\src folder to the SRC sibling in your project name in Eclipse. Then press F5, or you can right-click Refresh.

5. Finally connect your Android phone to your computer via USB cable, open the developer option on your phone and turn on USB debugging.

6. Finally right-click your project name run as on Eclipse, select Android application and wait for the COCOS2DX Classic logo to appear on your phone.

The whole process is complete.

What is wrong or does not understand can be put forward in the following comments, or people exchange. I am also a novice start. We make progress together.

How to configure the Android environment for Coocs2d-x 3.2 on Win7 and pack the APK

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.