Trying to run ndk-gdb and getting this error:
Android NDK installation path: /Library/AndroidSDK/ndk/
Using specific adb command: /Library/AndroidSDK/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.31
Using ADB flags:
Using auto-detected project path: .
Found package name: com.dev.project
jni/Android.mk:18: * Android NDK: Aborting. . Stop.
ABIs targetted by application: Android NDK:
Device API Level: 17
Device CPU ABIs: armeabi-v7a armeabi
ERROR: The device does not support the application’s targetted CPU ABIs!
Device supports: armeabi-v7a armeabi
Package supports: Android NDK:
The 18th line in the jni/Android.mk is an import module call.
What does that mean and how to remedy it?
App is debuggable as per ndk documentation. I’m using Mac.
I can build and run the App, so build script should be fine.
LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libgl2jni LOCAL_CFLAGS := -Werror -Wall -g LOCAL_CPPFLAGS := -std=c++11 LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../src $(LOCAL_PATH)/../../include $(LOCAL_PATH)/../../../boost NDK_MODULE_PATH := $(LOCAL_PATH)/../../lib/ndk LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/*.cpp) $(wildcard $(LOCAL_PATH)/../../src/*/*.cpp)) LOCAL_LDLIBS := -llog -lGLESv2 LOCAL_STATIC_LIBRARIES := freetype include $(BUILD_SHARED_LIBRARY) $(call import-module,otherlib) #commenting this line launches the ndk-gdb, but ndk-build fails
APP_STL := gnustl_static #remove for release? APP_ABI := armeabi armeabi-v7a APP_OPTIM := debug
I had the same problem. I’m quite sure it is a bug in the
core/build-local.mk script. At least the error message is not meaningful.
I fixed doing this:
path_to_look_for_modules should be the parent directory of your module declared in the Android.mk. That is, if you have
/myproject/mylibs/otherlib export the path
If you have several paths, as usual:
If you are building an Android app and have some ndk code you may be able to solve this problem by adding/modifying your Application.mk (usually in the jni directory) with the following line:
# The ARMv7 is significanly faster due to the use of the hardware FPU APP_ABI := armeabi armeabi-v7a x86 mips #APP_ABI := armeabi APP_PLATFORM := android-10
I mean the APP_ABI line. This is specifying the target processors to compile the ndk code for. I am assuming from the error message that you are testing on a device that has a different cpu type than the ones you built the app for.
Useful information about third party libraries
Possible issue with makefile or environment
where [Path] is the parent of “jni” directory, which in turn contains your NDK code.
You “might” face this issue if your NDK code (jni directory) is located separately from your Android java code.
A common solution to this problem is to include this line in your Application.mk.
APP_ABI := armeabi-v7a
Replace armeabi-v7a by the appropriate API as per the
Device supports line. This will ensure that your application is built for the correct platform, and that
ndk-gdb can find it.