0

I'm trying to debug native application in Eclipse. Unfortunately, when I run "Debug As-> Android Native Application" I see the following errors in the console:

[2014-09-10 21:03:48 - GenderDetector] Verify if the application was built with NDK_DEBUG=1
[2014-09-10 21:04:16 - GenderDetector] gdbserver output:
[2014-09-10 21:04:16 - GenderDetector] run-as: Package 'com.opencv.genderdetector' is unknown

If I try to add "NDK_DEBUT=1" to the ndk-build command I see the following errors:

[armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.9] libs/armeabi-v7a/gdbserver
install: cannot stat ‘/home/yury/software/android-ndk/prebuilt/android-arm/gdbserver/gdbserver’: No such file or directory
make: *** [libs/armeabi-v7a/gdbserver] Error 1

Could someone please explain what I'm doing wrong?

Yury
  • 20,618
  • 7
  • 58
  • 86
  • Possibly related: [Debugging Android NDK native apps](http://stackoverflow.com/questions/8934575/debugging-android-ndk-native-apps). – jww Sep 13 '14 at 12:56
  • Also, consider [this post](http://stackoverflow.com/questions/25159644/debug-native-application-on-samsung-4-4-2-package-is-unknown-with-run-as-comma) Some regression was introduced with respect to file permissions in Android 4.3 (patched in Android 4.4). Samsung still seems to experience problems. Make sure you are not in this situation. – Steven De Bock Dec 23 '14 at 19:41

3 Answers3

2

Here is a steps that may help you :

  1. Check if /home/yury/software/android-ndk/prebuilt/android-arm/gdbserver/gdbserver is exsits
  2. Check if it has execution permission.
  3. Add this path to your environment variables this maybe will help.
  4. Make sure your android-ndk folder is complete as it comes from google when you download.

Regards.

Creative Coder
  • 409
  • 6
  • 15
0

Build your application like this : ndk-build NDK_DEBUG:=1 APP_OPTIM:=debug This enables the debug flag and also creates symbol files used by the debugger. You will see 2 files gdbserver.so and gdb.setup created within jni/libs folder. After this is done, you are good to debug as native application.

G3M
  • 1,023
  • 8
  • 19
0

I meet this error when I use android-ndk-r10. After I uses android-ndk-r10e, this error disappear.

qhdwangnan
  • 175
  • 1
  • 5