问题
I am importing a .aar file as a dependency in my android project and have added this to Android.mk file.
Now internally this file has dependency on some .so files which its not able to pick up automatically.
So I copied all the dependent .so files under the below structure,
app --> libs --> arm64-v8a --> test.so
|
| --> x86 --> test.so
And now I tried several combination of below config in Android.mk file, but the above test.so file is not getting added to the apk generated after building.
. . . .
**include $(CLEAR_VARS)
ifneq (,$(filter $(TARGET_ARCH_ABI), armeabi-v7a x86 arm64-v8a x86_64))
LOCAL_MODULE := Some Name
LOCAL_SRC_FILES := sources/app/libs/$(TARGET_ARCH)/xyz.so //Path of of my local .so file
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(PREBUILT_SHARED_LIBRARY)**
I tried lot of googling and also referred Android Xref, but unable to figure out what I am missing.
Any leads?
回答1:
LOCAL_PREBUILT_JNI_LIBS = libs/xxxx.so
See example: https://github.com/ayufan-pine64/proprietary_vendor_google_atv/blob/master/atv/Android.mk
来源:https://stackoverflow.com/questions/59452477/how-to-add-so-file-in-android-mk-file