码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2015-04-02 22:12:40      阅读:1625      评论:0      收藏:0      [点我收藏+]

标签:

下面是我引用了一个小的例子,这个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库

标签:

原文地址:http://www.cnblogs.com/zqlxtt/p/4388286.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!