4

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 を使用してインストールしました。アプリを実行し、アプリは正常に動作します
  • 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

    デバイス CPU ABI: x86

    互換性のあるデバイス ABI:

    gdb セットアップ初期化の使用:

     ./libs/armeabi/gdb.setup
    

    ツールチェーン プレフィックスの使用:

     /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!
    
4

2 に答える 2