Sakir saiyed
Sakir saiyed

Reputation: 742

Cocos2d-X : how to run Cocos2d-X project (mac) developed with XCode on android device (eclipse)?

i have developed one demo app in cocos2d-x . It nicely runs on my cocos2d-x simulator (iPhone). Now i want to run this app on android device(using eclipse AVD or say my android device). i successfully setup all environment as explained here http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started. i also run one hello world demo on my android simulator using eclipse.

Now, what i want is to run my this existed cocosd-x project on Andriod device.How can i achieve this !? [i am on mac platform]

This is much like porting my cocos2d-x iPhone project to android .

Any kind of help would be appreciated lot.

Upvotes: 0

Views: 2280

Answers (1)

GizmoThunder
GizmoThunder

Reputation: 235

  • go to cocos2d-x directory (that you downloaded)
  • run "create-android-project.sh" (follow the on screen instructions)
  • Replace the "Classes" "Resources" directories in the newly created project directory with the ones you have in your XCode project.
  • Add your cpp files to the proj.android/jni/Android.mk file.
  • run "build_native.sh" in proj.android directory.
  • Open Eclipse, Import your android project
  • Link the cocos2d-x java project (this will be under cocos2d-x/platform/android/java)
  • Run the project. (If you have your android phone connected to the machine with DEBUG over USB enabled). You should see the project launched on your phone.

Upvotes: 3

Related Questions