Android - using Prebuilt shared libraries that target Armeabi-v7a
I am using some pre-build android libraries, by sticking them in my jni folder and putting this in the Android.mk
# Add prebuilt libgdx
include $(CLEAR_VARS)
开发者_JS百科LOCAL_MODULE := libgdx
LOCAL_SRC_FILES := libgdx.so
include $(PREBUILT_SHARED_LIBRARY)
this copies the file to libs/armeabi
but this library also contains some similarly named pre-built .so files that are indended for libs/armeabi-v7a
So how would I write my .mk file to properly direct these files to their respective folders?
Write this in Android.mk
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := TestNDK
LOCAL_SRC_FILES := TestNDK.c.arm.neon
LOCAL_ARM_NEON := true
include $(BUILD_SHARED_LIBRARY)
endif # TARGET_ARCH_ABI == armeabi-v7a
And then specify within your Application.mk file:
APP_ABI := armeabi-v7a
精彩评论