Eclipse Development COCOS2DX 3.2 Environment Building Three: Ccp-tests Project compilation (This is not a CDT project)

Source: Internet
Author: User

COCOS2DX also has a few test items, the 3.2 version is under the Tests folder under the installation directory. The Ccp-tests project contains a lot of usage examples, and beginners can quickly learn the basics of COCOS2DX by familiarizing themselves with this project.

I was in the test Cpp-tests project still encountered something, this time to summarize.


Enter the Ccp-tests directory to see the same structure as the previous Test project.

" file->new->other->android/android Project from Existing Code "), but found that Ccp-tests did not have the build_native.py file, and there is no" CDT builder "in the builder, it does not compile if it runs directly. And when you "right-click" -> Properties "You will find that the" this project was not a CDT project "appears.

But the previous test project was different, so for a while I've been struggling with how to turn this project into "CDT project", but I've been unable to find a way.


In fact, the problem is still not compiled, so try the first chapter of their own creation of the NDK Builder, compile will error, it seems this is not the best method, I believe COCOS2DX will have a simple method.

In fact, there is a readme file under the Ccp-tests project, but according to the steps are also not, and according to the information on the Internet I think those steps are actually COCOS2DX 2.x version, is not a 3.x version, purely misleading.

But this also reminds me, later saw in the installation directory also has a readme document, open a look inside sure there is a solution.

It is highly recommended to build COCOS2DX 3.2 Friends First read this document, the introduction of the very clear, you can not go online to find, but also easy to be misled by the error message!

This document details how to install COCOS2DX under different systems, create test projects, compile and run cpp-tests, and more.


The original text does not extract, compile cpp-tests and other items only need a command (under Windows), command line mode into the COCOS2DX installation directory of the build directory, run:

Python./android-build.py xxxx-p 10

where xxxx is the project name, such as this article is cpp-tests.

Then began to compile the project, Cpp-tests project is very large, need to compile a long time ....


After the compilation is successful,this project was imported with Eclipse (" file->new->other->android/android Project from Existing Code"). This may also be an error, such as the reference error mentioned in the previous article, my case is not quoted, then I do the reference. Right-->build path->config Build Path, create a new reference "link source" under Source, with the name "Libcocos2d", The path is "cocos2dx root directory \cocos \platform\android\java ".

Also can see the project under the cocos2d is empty, this does not seem to affect the operation, but can also set him up. Select Cocos2d Right - ->properties->resource and edit the path to "Cocos2dx root \cocos\".


This project has been successfully imported, you can see after compiling has been hit the APK package, directly Run as->android application can be. Because the apk file is very large, it takes a long time and it runs automatically after the installation is successful!

This time again taught me, must first carefully read the Readme, each time they are lazy directly online search, the results are all kinds of misleading!


Related Article

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.