Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging native code in android under eclipse fails

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!

like image 681
david-hoze Avatar asked Jun 09 '13 15:06

david-hoze


2 Answers

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.

like image 139
DevByStarlight Avatar answered Oct 19 '22 13:10

DevByStarlight


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

like image 42
jonco29 Avatar answered Oct 19 '22 11:10

jonco29