2

Cocos2d-x 3.7.1 + ndk r10e project on Mac trying to debug in Eclipse. Days pass and the errors keep coming...

I can build and run using cocos compile and cocos run with -p android -m debug --ndk-mode NDK_DEBUG=1 from the terminal in proj.android.

My app runs Ok (eventually) on my x86 emulator no problem.

Typing 'ndk-gdb' in the terminal from ./proj.android and I get the error

ERROR: Could not find gdb.setup under ./libs/

BUT the file gdb.setup (and gdbserver & libcocos2dcpp.so) can be seen in ./proj.android/libs/x86 !?

My AndroidManifest.xml includes android:debuggable="true"

My jni/Application.mk includes APP_ABI := x86 (only)

If anyone can tell me how I can diagnose or fix this problem then I guess I owe them a beer (in Yorkshire btw)

UPDATE: I have tried running up GDB using the --verbose flag. The output shows

Using gdb setup init: ./libs/armeabi/gdb.setup

Using app out directory: ./obj/local/armeabi

Guess I need to change to settings/init file somewhere??

AndyF.
  • 51
  • 8

2 Answers2

4

I ran into the same problem. It seems something changed in recent version of Android Build tools.

The trick is:

ERROR: Could not find gdb.setup under ./libs/

It expects gdb.setup is in the directory libs but NOT libs/armeabi

so the simple workground is to copy gdb.setup and gdbserver from "libs/cpu" to "libs" and it works like a magic!

huluyige
  • 645
  • 4
  • 10
0
zombielei
  • 163
  • 1
  • 8