I've a static java library compiled as a jar file. This jar loads a .so library using System.loadLibrary. Then another Android application project links statically the jar file.
Everything is compiled using an Android.mk file in the NDK...how can I make the shared native library being included and correctly loaded from my final application (and "seen" from the jar code)?
Ok I solved the problem by using these instructions in Android.mk:
$(shell cp $(wildcard $(LOCAL_PATH)/libs/armeabi/*.so) $(TARGET_OUT_INTERMEDIATE_LIBRARIES)) LOCAL_JNI_SHARED_LIBRARIES:= libMyLib
just before
include $(BUILD_PACKAGE)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.