Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ndk-gdb error: device does not support the application's targetted CPU ABIs

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.


Android.mk

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

Application.mk

APP_STL := gnustl_static

#remove for release?
APP_ABI := armeabi armeabi-v7a 
APP_OPTIM := debug
like image 851
Kimi Avatar asked Feb 25 '13 12:02

Kimi


2 Answers

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:

export NDK_MODULE_PATH=path_to_look_for_modules

Where 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 /myproject/mylibs

If you have several paths, as usual:

export NDK_MODULE_PATH=path1:path2:path3
like image 178
Paglian Avatar answered Nov 15 '22 23:11

Paglian


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

like image 38
hack_on Avatar answered Nov 15 '22 21:11

hack_on