Cocos2d-x upgrade to 3.4 with Create Android project

Source: Internet
Author: User

Cocos2d-x upgrade to 3.4 with Create Android project1 Upgrade Installation Cocos2d-x

Windows7 64-bit machine, download cocos2d-x-3.4 on the website:

Http://www.cocos2d-x.org/filedown/cocos2d-x-3.4.zip

Unzip to the path where the environment variable cocos_x_root is located, setting the following environment variable:

Cocos_x_root=d:\gamedev\cocos\frameworks\cocos2d-x

instead :

cocos_x_root=d:\gamedev\cocos\frameworks\cocos2d-x-3.4

Similarly, in an environment variable, the place where the cocos2d-x appears is replaced with cocos2d-x-3.4 .

2 Installing the eclipse+ndk+android SDK

This is more cumbersome, I use the one-click Nvidia installation package: Tadp-3.0r4-windows.exe

After installation, make sure that the following configuration exists in the environment variables:


3 Creating a Cocos2d-x project

To open the cmd command window:

CD%cocos_x_root%

Python setup.py


Close cmd, and then open. The following actions are similar:

The project has been created. Start compiling below.

4compiling to Android platform

Go to the directory where the project build_native.py, execute the command:

CD C:\workspace1\gamedev\demogame\proj.android

Python build_native.py

Then there is the lengthy compilation process. After the compilation is complete, import the project using Eclipse:

Eclipse->file->import->general/existing Projects into Workspace, select directory:

C:\workspace1\gamedev\demogame\proj.android

The following error will then occur:

Need to right click on the src directory above, click Import

Press the input below and click Finish:


At this point, Cocos2d-x's Android project was created and compiled without errors. Deploy and run the program below!

5 Deploy and run programs to the Android platform







Cocos2d-x upgrade to 3.4 with Create Android project

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.