Android.mk 引入jar和aar包
Posted 王睿丶
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android.mk 引入jar和aar包相关的知识,希望对你有一定的参考价值。
diff --git a/android.mk b/Android.mk
index f6ff7f4..1dd55fe 100644
--- a/Android.mk
+++ b/Android.mk
@@ -2,6 +2,8 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_STATIC_JAVA_LIBRARIES := jzxing
+LOCAL_STATIC_JAVA_AAR_LIBRARIES:=azxing
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
LOCAL_SRC_FILES := $(call all-java-files-under, src)
@@ -16,4 +18,13 @@ LOCAL_SYSTEM_EXT_MODULE := true
LOCAL_SHARED_ANDROID_LIBRARIES := android-support-v7-appcompat
include $(BUILD_PACKAGE)
-
+include $(CLEAR_VARS)
+LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES += jzxing:libs/core-3.3.2.jar \\
+ libs/core-3.3.2.jar \\
+ libs/core-3.3.2-javadoc.jar \\
+ libs/core-3.3.2-sources.jar \\
+ libs/zxing-android-embedded-3.6.0-sources.jar
+include $(BUILD_MULTI_PREBUILT)
+include $(CLEAR_VARS)
+LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES +=azxing:libs/zxing-android-embedded-3.6.0.aar
+include $(BUILD_MULTI_PREBUILT)
以上是关于Android.mk 引入jar和aar包的主要内容,如果未能解决你的问题,请参考以下文章
Android 源码环境下用Android.mk 导入aar
Android 源码环境下用Android.mk 导入aar