ฉันกำลังพยายามใช้ ndk-gdb เพื่อดีบักโปรเจ็กต์ Android ดั้งเดิมของฉัน เมื่อฉันรันคำสั่ง ndk-gdb ฉันได้รับข้อผิดพลาด
Could not find gdb.setup under ./libs/
คำอธิบาย
- ใช้งาน MacOSX, ndk r10e; ใช้ตัวอย่าง ndk ในซานแองเจลิส
- ทำตามขั้นตอนที่นี่เพื่อตั้งค่าการดีบักดั้งเดิม https://developer.android.com/ndk/guides/ndk-gdb.html
- โดยพื้นฐานแล้วฉันตั้งค่า android:debuggable="true", APP_OPTIM := debug และสร้างเนทิฟโดยใช้ ndk-build NDK_DEBUG=1 (การตั้งค่า 3 อย่างนี้อาจไม่จำเป็น แต่ในกรณีนี้)
- ใช้ ant debug, adb install เพื่อติดตั้ง; แอพ Ran และแอพทำงานได้ดี
การรัน ndk-gdb --verbose จะสร้าง
ndk-gdb --verbose
เส้นทางการติดตั้ง Android NDK:
/Users/hanantha/Documents/Dev/android-ndk-r10e
การใช้คำสั่ง adb เริ่มต้น:
/Users/hanantha/Documents/Dev/android-sdk-macosx/platform-tools/adb
พบเวอร์ชัน ADB: Android Debug Bridge เวอร์ชัน 1.0.32
Revision eac51f2bb6a8-android
การใช้แฟล็ก ADB:
การใช้คำสั่ง JDB:
/usr/bin/jdb
การใช้เส้นทางโครงการที่ตรวจพบอัตโนมัติ: .
พบชื่อแพ็คเกจ:
com.example.SanAngeles
ABI ที่กำหนดเป้าหมายโดยแอปพลิเคชัน: arm64-v8a armeabi armeabi-v7a armeabi-v7a mips mips64 x86 x86_64
ระดับ API ของอุปกรณ์: 19
ABI ซีพียูของอุปกรณ์: x86
ABI ของอุปกรณ์ที่รองรับ:
การใช้การตั้งค่า gdb init:
./libs/armeabi/gdb.setup
การใช้คำนำหน้า toolchain:
/Users/hanantha/Documents/Dev/android-ndk-r10e/toolchains/x86-4.8/prebuilt/darwin-x86_64/bin/i686-linux-android-
การใช้ไดเรกทอรีออกของแอป: ./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!