3

I'm trying to debug a native android app using ndk-gdb tool. When I execute the ndk-gdb, I get the following error.

"/home/amila/Android/Ndk/android-ndk-r20/build/core/add-application.mk:88: *** Android NDK: Aborting... . Stop. ERROR: Failed to retrieve application ABI from Android.mk."

I have built the native parts using ndk-build command and the app is getting built in Android Studio without any issue.

jni directory: /ndktest/jni (where ndktest is the app name)

I ran the ndk-gdb command in the directory where the AndroidManifest.xml resides (/ndktest/app/src/main).

I also tried by adding APP_ABI := arm64-v8a into the Android.mk and nothing changed.

jni/Android.mk

LOCAL_PATH := $(call my-dir)    

include $(CLEAR_VARS)

LOCAL_MODULE := ndktest
LOCAL_SRC_FILES := ndktest.cpp

include $(BUILD_SHARED_LIBRARY)

jni/Application.mk

APP_ABI := arm64-v8a

There should be no errors when I run the ndk-gdb tool.

Mangesh Pawar
  • 309
  • 1
  • 14

1 Answers1

0

Note that ndk-gdb does not take your gradle configuration into consideration, so if you have a modified file structure, make sure that your Android.mk file is located inside a "jni" folder inside the project directory.

Gaztin
  • 11
  • 3