Senlern
Reprint please specify, original link: http://blog.csdn.net/zhang429350061/article/details/37959489
In the previous article I shared such as under the Win32 Configuration Environment construction project, did not look at the children's shoes please first read this article: http://blog.csdn.net/zhang429350061/article/details/37958275
-----------------------------------------Download the JDK configuration environment variable---------------------------------
Download URL:http://www.oracle.com/technetwork/java/javase/downloads/index.html
The system environment variables need to be configured after successful installation:
New variable: CLASSPATH values are: .
New variable:java_home value: The actual installation path of the JDK
Add New in Path %java_home%\bin; ( Note the last semicolon )
------------------------------Download the NDK configuration environment variable---------------------------
: http://developer.android.com/tools/sdk/ndk/index.html
After the download is complete, it is a compressed package, unzip it.
New variable: The Ndk_root value is: You can go inside the extracted path.
---------------------------start the command line to compile the Android project------------------------
First, in CMD, first CD to your project's E:\MyGame\proj.android, and then run the build_native.py script directly
We see below output the Select NDK toolchain version was 4.8! That's great! The next step is a lengthy compilation process.
You will then have the following output:
After the compilation is done this looks like this:
Congratulations! Done
--------------------------------------project into Eclipse and run on your Android phone---------------------------------------
We use an integrated ADT directly, with the Eclipse and Android SDK:http://developer.android.com/sdk/index.html
After downloading the extract, we open the Eclipse folder Eclipse.exe to start Eclipse.
Click File->new->project after booting:
Then select Android Project from Existing Code:
Then select your project's proj.android directory in root directory and click Finish
Wait, is not the project name there is a red fork, seemingly there is a mistake, how to do?? Haha, do this:
Project Agency right-click, select Import:
Then select the displayed selections:
Then Select the following path in Root directory (refer to your own path settings yourself):
Note: The following project only selects the first one, the other is not selected, you can first select Deselect all in the button on the right, then select the first one individually, then finish
It's not a mistake, it's so magical
Now we can run on our own Android phone, right-click on the agency to select as:
Then you will be prompted to select a phone box, double-click:
At this point we can see the output below the console:
Is it now that your game has run on your phone?
Finally give you a little knowledge, if you want to view only the Cocos2d-x debug output in Logcat, you can click this green plus:
Then set this:
And then there's Jiangzi:
Ok! Is it so much easier to view the debug information!
----------------------------------------Notes------------------------------------
capacity is limited, welcome to exchange, if correct, greatly appreciated! ( Everyone help to the top )
Android cross-compilation "Cocos2d-x 3.0" game development