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.