15

I'm trying to debug the native code in the "csipsimple" android app using the Debug As->Android Native Application option. I used this tutorial to do it. I keep getting these errors:

[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] Android
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] NDK:
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] Uses
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] local
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] settings
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] 
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] 
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] 
[2013-06-09 17:24:24 - SipHome] Unknown Application ABI: 
[2013-06-09 17:24:24 - SipHome] 
armeabi
[2013-06-09 17:24:24 - SipHome] Unable to detect application ABI's

I tried

Unable to detect application ABI's when trying to debug NDK (not relevant, I didn't use Sequoya),

http://www.cocos2d-x.org/boards/6/topics/24216 (didn't work)

https://groups.google.com/forum/?fromgroups#!topic/android-ndk/icsQtRy1FZQ (worked mysteriously one time only)

http://www.mjbshaw.com/2012/11/android-ndk-eclipse-fixing-unknown.html (not the problem)

http://en.it-usenet.org/thread/12874/17301/ (didn't work)

I'm using the ADT bundle v22 (eclipse 4.2.1), with the Android NDK r8e, under Ubuntu 12.10.

csipsimple uses jni and swig to call the native code.

I'm desperate, help me!

Community
  • 1
  • 1
david-hoze
  • 1,045
  • 15
  • 31

3 Answers3

8

For NDK R9 (works in others too but line# may differ):

${NDK}/build/core/add-application.mk
line 138

add "#" at start of the line.

# $(call __ndk_info,WARNING: APP_PLATFORM $(APP_PLATFORM) is larger than \
    android:minSdkVersion $(APP_MIN_PLATFORM_LEVEL) in $(APP_MANIFEST))

One character, 30 second fix ... go debug native code.

jww
  • 97,681
  • 90
  • 411
  • 885
DevByStarlight
  • 1,070
  • 13
  • 17
  • 3
    This gets the application to launch but it still can't be debugged (hit breakpoints in C++ code) it seems. We get output like: "run-as: Package 'com.our.app' is unknown Verify if the application was built with NDK_DEBUG=1" – eodabash Aug 01 '13 at 18:55
  • 1
    solution worked, but read the comment above, by eodabash.. Application does not gets debugged.. – Rizwan Sohaib Sep 03 '13 at 09:28
  • Hitting breakpoints is unrelated to the above APP_PLATFORM warning. There are any number of reasons breakpoints may not be hit. Try building manually from command line using the Android tools. For instance: 1) "ndk-build NDK_DEBUG=1" ... 2) "ant debug" ... and 3) ndk-gdb --launch=com.your.app.activity ... to launch app and verify can set breakpoints. If ndk-gdb cannot debug c++ then Eclipse won't either. Also, it sometimes helps to run and debug the app as a java app first and then run it again for native debuggging. – DevByStarlight Sep 15 '13 at 07:23
  • In Eclipse ... make sure you added the NDK_DEBUG=1 option in the project's C/C++ settings for the build command. – DevByStarlight Sep 15 '13 at 07:25
2

After getting this to work, and then re-creating my app to see what works, I have found the following:

in the AndroidManifest.xml, you have to set min/target SDK version to match that of your phone.

[jc@jc-u13:anotherJniDebugTest]$ adb shell getprop|grep build.version
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [5c6c6b0b1b]
[ro.build.version.release]: [4.3.1]
**[ro.build.version.sdk]: [18]**

therefore, my manifest versions had to be 18. If i had my version set to 17, i would get the above error

jonco29
  • 21
  • 1
0

Do you use the info, warn, etc. functions to log messages in any of your Android.mk files? Like $(info my-log-message) It looks like your do and it's logging the string:

Android NDK: Uses local settings

If so, remove them all and try again.

thaussma
  • 9,756
  • 5
  • 44
  • 46