如何在源码编译中增加第三方库
1个回答
展开全部
很多时候在开发APK的时候需要调用加载调用独立的第三方库文件 下面举例如何在应用中添加
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CERTIFICATE := platform
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_STATIC_JAVA_LIBRARIES := libammsdk //随便起的第三方库别名
LOCAL_PACKAGE_NAME := wechat_sdk_sample_android
include $(BUILD_PACKAGE)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libammsdk:libs/libammsdk.jar
//libammsdk:libs/libammsdk.jar是给libs/libammsdk.jar起别名,但是必须和LOCAL_STATIC_JAVA_LIBRARIES中的名称一致
include $(BUILD_MULTI_PREBUILT)
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CERTIFICATE := platform
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under,src)
LOCAL_STATIC_JAVA_LIBRARIES := libammsdk //随便起的第三方库别名
LOCAL_PACKAGE_NAME := wechat_sdk_sample_android
include $(BUILD_PACKAGE)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := libammsdk:libs/libammsdk.jar
//libammsdk:libs/libammsdk.jar是给libs/libammsdk.jar起别名,但是必须和LOCAL_STATIC_JAVA_LIBRARIES中的名称一致
include $(BUILD_MULTI_PREBUILT)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询