1

cocos2d-x V3.7 supports Android Studio, but I'm unable to run even the test app. Everytime I deploy the app on my Android device and try to run, my device gives and error "Unfortunately, libcocos2dx has stopped". I think I'm doing it the wrong way. Can anyone guide me with how to run the project properly?

2 Answers 2

1

Android Studio cant build with ndk yet, so what i do, is import proj.android on Android Studio, and then compile in console in the root of you project:

Cocos compile -p android

And now you can Debug and install the apk file on android studio, just click debug and play, no more crashes, but if you modify any file ,you need to compile again in cocos console, and install the apk again VIA Android studio Debug.

2
  • Thanks this works, I used the following command "cocos compile -p android --android-studio". But now I can't debug in Android Studio. I have placed a few break points but they don't seem to work. Commented Aug 11, 2015 at 12:58
  • @finalpets, you say you can debug and install apk.. what do you mean by debug? Java code? C++ code? Please clarify it.
    – Notbad
    Commented Aug 25, 2015 at 23:19
1

break point work in java file in android studio.break point in cpp file is not consider in debug.Try to debug build_native.sh file in console and then run your project

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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