【发布时间】:2013-06-20 09:58:54
【问题描述】:
操作系统:Windows8 x64
Eclipse:ADT 捆绑形式 http://developer.android.com/sdk/index.html
NDK:来自http://developer.android.com/sdk/index.html 的适用于 Windows 64 的 NDK8e。
我将 Windows/Preference/Android/NDK 设置为正确的 NDK 路径。
我做什么:
将 hello-jni 示例从 %Android-NDK%/samples 导入到 Eclipse
-
在AndroidManifext.xml中修改
<uses-sdk android:minSdkVersion="3" /> to <uses-sdkandroid:minSdkVersion="17" /> -
添加原生支持
右击项目,Android Tools/Add Native Support。
-
开启调试
右键项目,Properties/“C/C++ build”/Build Settings,修改Build命令为“ndk-build NDK_DEBUG=1”
在 C 代码中设置断点。
调试为/Android 原生应用程序。
我已经在两台电脑上做这件事了。但是有两个错误信息。
一个是这样的:
[2013-06-12 00:03:09 - HelloJni] Unknown Application ABI:
[2013-06-12 00:03:09 - HelloJni] [2013-06-12 00:03:09 - HelloJni] Unable to detect application ABI's
另一个是这样的:
warning: Could not load shared library symbols for 73 libraries, e.g. /system/binnker.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
warning: Unable to find dynamic linker breakpoint function.
GDB will retry eventurally. Meanwhile, it is likely
that GDB is unable to debug shared library initializers
or resolve pending breakpoints after dlopen().
【问题讨论】:
-
Could not load shared library symbols for 73 libraries正常,您的设备上确实没有系统库的符号信息。
标签: windows debugging android-ndk