3
\$\begingroup\$

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?

\$\endgroup\$
2
\$\begingroup\$

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.

\$\endgroup\$
0
1
\$\begingroup\$

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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