Debugging native code in android under eclipse fails

北战南征 提交于 2019-12-19 12:37:11

问题


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!


回答1:


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.




回答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




回答3:


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.



来源:https://stackoverflow.com/questions/17010969/debugging-native-code-in-android-under-eclipse-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!