How to Write a Win32 cocos2d-x to Android to run

Source: Internet
Author: User

First, you must have several tools. Cygwin, ndk, Android-SDK, and eclipse compilation.

 

 

It is actually very simple. The latest version of cocos2d-x 2.0.1. There's a file create-android-project.bat inside

 

My previous articles on this configurationArticleWrite

Now a common hellowworld Android project is generated. ------- Androidball

 

Go to the generated document and find that there are three folders, one being resource. One is proj. Android and the other is class.

 

Copy proj. Android to the file project directory you want to generate. Added ---------- ballgame to be compiled under Win32.

 

Then, you will find that there are many folders

As follows.

 

 

In this case, you need to modify the Android. mk file compilation under the proj. Android ----> JNI folder ---->.

 

 

The following is a general modification.

 

 

 

 

 

 

Modify it to the directory of the file to be compiled and the referenced header file.

 

 

Then compiled by cygwin. Put it in eclipse and install it on your mobile phone. You can run it .~ The tears ran away. It took a long time before.

 

 

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.