Debugging native code in android under eclipse fails

后端 未结 3 896
孤街浪徒
孤街浪徒 2021-01-17 10:07

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.

相关标签:
3条回答
  • 2021-01-17 10:35

    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.

    0 讨论(0)
  • 2021-01-17 10:43

    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

    0 讨论(0)
  • 2021-01-17 10:59

    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.

    0 讨论(0)
提交回复
热议问题