Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Hi I've made a small game for iPhone that I also want to run on Android but I'm having problems setting up Cocos2D-X for Android.

I've downloaded and installed Android SDK and NDK (under my "/Users/username/Android").

Installed all necessary packages under SDK and created an Emulator. Copied Cocos2D-x under "/Users/username/cocos2dx".

Installed Eclipse IDE with ADT Plugin.

Opened "Users/username/cocos2dx/tests/build_native.sh" and changed "NDK_ROOT_LOCAL=/Users/username/Android/android-ndk", "COCOS2DX_ROOT_LOCAL=/Users/username/cocos2dx" to the values shown.

On running the script using Terminal it compiles test project. What's next?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

The steps are as follows:

  • Generate the project for Android using cocos2d-x template

  • Add project to NVPack's Eclipse

  • Fix make files, IDE configuration and whatnots

  • Compile the libraries with Cygwin and build_native.sh script, they will be automatically added to the obj folder of the project

  • Execute/debug like an Android application

Those are the windows steps, I am not sure about the iOs part but it shouldn't be much different.

share|improve this answer
    
Got it working thanks. –  2600th May 8 '12 at 6:42
add comment

Here's a tutorial on creating a Cocos2d-X meta-project for multiple platforms.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.