Har*_*ish 4 c++ debugging android android-ndk ndk-gdb
我正在尝试使用ndk-gdb来调试我的原生android项目.当我运行命令ndk-gdb时,我收到错误
Could not find gdb.setup under ./libs/
Run Code Online (Sandbox Code Playgroud)
说明
运行ndk-gdb --verbose生成
ndk-gdb --verbose
Android NDK安装路径:
/Users/hanantha/Documents/Dev/android-ndk-r10e
Run Code Online (Sandbox Code Playgroud)
使用默认的adb命令:
/Users/hanantha/Documents/Dev/android-sdk-macosx/platform-tools/adb
Run Code Online (Sandbox Code Playgroud)
发现ADB版本:Android Debug Bridge版本1.0.32
Revision eac51f2bb6a8-android
Run Code Online (Sandbox Code Playgroud)
使用ADB标志:
使用JDB命令:
/usr/bin/jdb
Run Code Online (Sandbox Code Playgroud)
使用自动检测的项目路径:.
找到包名称: com.example.SanAngeles
申请目标ABIs:arm64-v8a armeabi armeabi-v7a armeabi-v7a mips mips64 x86 x86_64
设备API级别:19
设备CPU ABI:x86
兼容设备ABI:
使用gdb setup init:
./libs/armeabi/gdb.setup
Run Code Online (Sandbox Code Playgroud)
使用工具链前缀:
/Users/hanantha/Documents/Dev/android-ndk-r10e/toolchains/x86-4.8/prebuilt/darwin-x86_64/bin/i686-linux-android-
Run Code Online (Sandbox Code Playgroud)
使用app out目录:./ obj/local/armeabi
找到可调试标志: true
错误:
Could not find gdb.setup under ./libs/
This usually means you modified your AndroidManifest.xml to set
the android:debuggable flag to 'true' but did not rebuild the
native binaries. Please call 'ndk-build' to do so,
*then* re-install to the device!
Run Code Online (Sandbox Code Playgroud)小智 5
我刚才在帖子中回答:https://stackoverflow.com/a/32972182/1617066
我遇到了同样的问题.最近版本的Android Build工具似乎发生了变化.
诀窍是:
ERROR: Could not find gdb.setup under ./libs/
Run Code Online (Sandbox Code Playgroud)
它期望gdb.setup位于libs目录中,但不是 libs/armeabi
所以简单的工作方法是将gdb.setup和gdbserver从"libs/cpu"复制到"libs",它就像魔术一样!