Copy the third-party static copy compiled by NDK to the JNI directory, and add the following code
to Android.mk. Take the openssl static library (libcrypto-static.a) as an example
. The first linking method: LOCAL_LDFLAGS := libcrypto-static.a
The second The first linking method: LOCAL_LDLIBS := libcrypto-static.a The
third linking method:
include $(CLEAR_VARS)
LOCAL_MODULE := third_static_lib (any name can be given)
LOCAL_SRC_FILES := libcrypto-static.a
include $(PREBUILT_STATIC_LIBRARY)
//in Reference third_static_lib in the module you want to compile
LOCAL_STATIC_LIBRARIES := third_static_lib
to Android.mk. Take the openssl static library (libcrypto-static.a) as an example
. The first linking method: LOCAL_LDFLAGS := libcrypto-static.a
The second The first linking method: LOCAL_LDLIBS := libcrypto-static.a The
third linking method:
include $(CLEAR_VARS)
LOCAL_MODULE := third_static_lib (any name can be given)
LOCAL_SRC_FILES := libcrypto-static.a
include $(PREBUILT_STATIC_LIBRARY)
//in Reference third_static_lib in the module you want to compile
LOCAL_STATIC_LIBRARIES := third_static_lib