22

I'm trying to debug an Android application with native code using ADT 20.0.3 on Eclipse and it's giving me this error:

[2012-10-04 12:09:12 - ndk_android] Unknown Application ABI: 
[2012-10-04 12:09:12 - ndk_android] 
[2012-10-04 12:09:12 - ndk_android] Unable to detect application ABI's

The jni files build properly and I can run the application, with the native code.

My build file Application.mk looks like this:

APP_OPTIM        := debug
APP_ABI := armeabi armeabi-v7a
APP_STL := gnustl_static

LOCAL_LDLIBS := $(ANDROID_NDK)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_static.a

Does anyone know what the cause of this error is? Has anyone gotten Native debugging to work with ADT 20?

I'm following the guide from here: http://tools.android.com/recent/usingthendkplugin

EDIT:

After cleaning and removing temporary files/folders/settings I was still getting the same error. I then installed a clean Eclipse. Installed the CDT, then the ADT, and that seems to have fixed this problem. I believe the problem was with Sequoyah or another plugin/settings in Eclipse.

This was solved, but now I'm getting another problem. The breakpoints aren't working, but I'll keep that for another question.

gninja
  • 343
  • 1
  • 3
  • 10
  • Yes, sequoyah does not coexist well with ADT 2.x – Alex Cohn Oct 05 '12 at 20:57
  • possible duplicate of ["Unknown Application ABI:" while 'debug as native application'](http://stackoverflow.com/questions/20047348/unknown-application-abi-while-debug-as-native-application) – CAMOBAP Dec 01 '14 at 09:27

5 Answers5

11

Go to Preferences -> Android -> NDK. You set a correct path for that, it will work. That way works for me.

TienDC
  • 301
  • 2
  • 9
3

I believe the problem was with Sequoyah or another plugin/settings in Eclipse. I installed a clean Eclipse. Installed the CDT, then the ADT, and that seem fixed this problem.

gninja
  • 343
  • 1
  • 3
  • 10
1

Try to cleanup the OBJ and libs directories, and only build one ABI. For example, add APP_ABI=armeabi next to NDK_DEBUG=1

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
0

I solved the problem by adding the APP_PLATFORM entry in Application.mk file as well as make sure the same min sdk version mentioned in manifest file.

For example, in my case, APP_PLATFORM:=21 added to Application.mk file added to manifest file.

Also you required to keep the break point in jni function definition not at jni native function declarations at java side.

Hope it helps.

appapurapu
  • 602
  • 7
  • 6
0

I had this error when used NDK r16b, fixed when switched to r10e.

mortalis
  • 2,060
  • 24
  • 34