参考google的方案,将相应cpu架构的so文件拷贝到lib目录,然后按照如下的方式编写Android.mk:
LOCAL_PATH := $(call my-dir)
my_src_arch := arm64-v8a
#my_src_arch := $(call get-prebuilt-src-arch, $(my_archs))
include $(CLEAR_VARS)
LOCAL_MODULE := TongueDiagnosis
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_TAGS := optional
LOCAL_BUILT_MODULE_STEM := TongueDiagnosis.apk
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE_PATH := $(TARGET_OUT)/app
#LOCAL_PRIVILEGED_MODULE :=
LOCAL_CERTIFICATE := PRESIGNED
#LOCAL_OVERRIDES_PACKAGES :=
LOCAL_SRC_FILES := TongueDiagnosisPad.apk
LOCAL_REQUIRED_MODULES := libprotobuf-cpp-full
LOCAL_PREBUILT_JNI_LIBS := \
lib/$(my_src_arch)/libjpeg-turbo1500.so \
lib/$(my_src_arch)/libnative-fengyun-lib.so \
lib/$(my_src_arch)/libSonixCamera.so \
lib/$(my_src_arch)/libusb100.so \
lib/$(my_src_arch)/libuvc.so \
lib/$(my_src_arch)/libUVCCamera.so
include $(BUILD_PREBUILT)