频道栏目
IT货架 > > 正文
Android源代码使用第三方jar包和android-support-v7-appcompat兼容lib库
网友分享于:Jan 1, 1970 8:00:00 AM    来源: IT货架   

标签:

下面是我引用了一个小的例子,这个makefile使用到了tct.drm.frameworks.jar,mtk-drm:libs/mtk.drm.frameworks.jar这两个jar包,并且该工程是依赖android-support-v7-appcompat兼容库的。 如果我们想把这个工程放到Android源码下编译,那么就需要加下面标注红色的内容:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += $(call all-java-files-under, ../../../../../external/drmagent/java)
#Include res dir from libraries
appcompat_dir := ../../../../../prebuilts/sdk/current/support/v7/appcompat/res
res_dirs := res $(appcompat_dir)
LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
LOCAL_JAVA_LIBRARIES := frameworks_ext tct.framework
LOCAL_JAVA_LIBRARIES := tct.feature_query
LOCAL_PACKAGE_NAME := FileManager
LOCAL_MODULE_PATH := $(TARGET_OUT_APP_PATH)
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
LOCAL_STATIC_JAVA_LIBRARIES += tct-drm mtk-drm
#LOCAL_STATIC_JAVA_LIBRARIES += xUitls-1.5.4
LOCAL_CERTIFICATE := platform
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat
LOCAL_PROGUARD_FLAG_FILES := proguard.cfg
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := tct-drm:libs/tct.drm.frameworks.jar \
                                        mtk-drm:libs/mtk.drm.frameworks.jar
include $(BUILD_MULTI_PREBUILT)

 

Android源代码使用第三方jar包和android-support-v7-appcompat兼容lib库

标签:

相关板块推荐 iPhone WindowsPhone

广告服务联系QQ:1134687142 | 网站地图

版权所有: IT货架- 内容来自互联网,仅供用于技术学习,请遵循相关法律法规. 京ICP备11030978号-1