1、在jni目录下新目录prebuilt,在此目录下新文件Androidusc.mk(名字随便取),将第三方库.so复制到此目录
2、打开Androidusc.mk添加内容,例如第三方库是libScreenPop.so:
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := ScreenPop LOCAL_SRC_FILES := libScreenPop.so include $(PREBUILT_SHARED_LIBRARY)
3、修改jni目录下的Android.mk文件,加入一条语句:
include $(LOCAL_PATH)/prebuilt/Androidusc.mk
Clean工程,完成。
时间: 2024-10-13 10:56:53