How to build and run HelloWorld on Android(gles20 branch)

Please read How to build and run HelloWorld on Android NDK r5 and above if you haven't read it.
This tutorial will only describe the difference between them.

The difference between them is about how to create a new android project by Eclipse.
In gles20 branch all java files, such as Cocos2dxMusic, are moved to cocos2dx/platform/android/java. It is a separate eclipse project, and it is referenced by all samples.
So we should create android project by Eclipse like this:

1. File -> Import...
import file

2. Click Next, set "root directory" as the root of cocos2dx, then you can import all android projects

3. Click Finish to import all projects

Now you have already imported all android projects offered by cocos2d-x.
Hope this tutorial can help you.

Because libcocos2dx(the java files offered by cocos2dx) is referenced by all samples, so you should build it before running a sample.

import.png - import file (48.8 kB) Minggo Zhang, 2012-06-20 03:04

select_root.png (180.8 kB) Minggo Zhang, 2012-11-02 02:07