Android: linked pre-created shared library (.so) in jar file in NDK

I have a static java library compiled as a jar file. This jar loads the .so library using System.loadLibrary. Then another Android application project statically links the jar file.

Everything is compiled using the Android.mk file in the NDK ... how can I enable and correctly load the shared source library from my last application (and "see" from the jar code)?

+2
source share
1 answer

Ok, I solved the problem using these instructions in Android.mk:

$(shell cp $(wildcard $(LOCAL_PATH)/libs/armeabi/*. so) $(TARGET_OUT_INTERMEDIATE_LIBRARIES)) LOCAL_JNI_SHARED_LIBRARIES: = libMyLib

$(BUILD_PACKAGE)

0

All Articles