A bit tired of setting up cocos-2d Android

I agree with you. Some ndk versions don’t work with some cocos2d-x versions. It’s a best problem about cocos2d-x and android platform build.

Maybe cocos2d-x team can add information when release new version. I don’t know.

Actually support of eclipse is being pulled of by the google after the launch of Android Studio.
So you must try using Android Studio.

I am not sure about Eclipse.
Even I was facing some problems with Eclipse. So I started using Android Studio for building .apk file and visual studio for writing the Scripts.

ndk 9 works fine with cocos2dx.
I have used it.
And now upgraded to ndk 10.

Cool…
Before you open project in android studio.
Compile it using the command I said in previous post.
Go to your project directory(Inside your project folder) typr cmd in address bar, it will open command prompt in the same directory then type the command.
cocos compile -p android --android-studio

it will compile your code.
Now
Open Android Studio
Go to File-> new-> Import Project-> Go to your project directory-> Open it and select the folder named “android-studio”

Then Run the program from the “Run button”
You can use any android device because emulator will take time.

Or you can directly go inside your project folder and you will going to see the new folder named “bin” the copy the apk file from there and run it on your device.

And ya inform me when its done because I am pretty much sure that these step will lead you to the success. :slight_smile:

Add these two in your path variable:

C:\Cocos\Cocos2d-x\Cocos2d-x-3.10\templates;
C:\Cocos\Cocos2d-x\Cocos2d-x-3.10\tools\cocos2d-console\bin;

Choose your own directory where you have unzipped your cocos2dx

you need to download sdk version 22

Which game you are working on?

I found NDK http://cocos2d-x.org/docs/installation/B/ updated to NDK r11c. Thanks
I could not find information about android-sdk version? What version do you use/should I use? android-sdk\platforms\android-23 ?

Regards,
Mariusz

I look and I only have android-23 installed.

Ok. Official configuration
Sdk: Android-23
Ndk r11c

You Just need to get the sdk version-22.
If if it dosen’t get removed after that then you can ignore it.
This must be just the warning.
Even the predefined classes in the cocos2d-x compile with some warnings. :wink:

Yes, Its the perfect combination of the software’s needed to run the cocos2d-x projects.
Give me the screenshot of the actual error u r getting.
And yes also tell me something about the project on which u r working so that I can think from that point of view also.