I am doing android custom ROM development now. the build system of aosp is based on Android.mk, But I want to include some aar libraries, is it possible to include aar libaries in Android.mk ?
My Android.mk
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
LOCAL_STATIC_JAVA_LIBRARIES += android-common
LOCAL_SRC_FILES := $(call all-java-files-under, app/src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/app/src/main/res
LOCAL_RESOURCE_DIR += prebuilts/sdk/current/support/v7/appcompat/res
LOCAL_MANIFEST_FILE := app/src/main/AndroidManifest.xml
LOCAL_PACKAGE_NAME := PackageName
LOCAL_SDK_VERSION := current
LOCAL_PROGUARD_FLAG_FILES := app/proguard-rules.pro
LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat
LOCAL_AAPT_FLAGS += --extra-packages com.exp.librairy
LOCAL_STATIC_JAVA_AAR_LIBRARIES := explibrairy
include $(BUILD_PACKAGE)
#Build aar libs
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_AAR_LIBRARIES := explibrairy:project/build/outputs/aar/explibrairy-debug.aar
include $(BUILD_MULTI_PREBUILT)
include $(call all-makefiles-under, $(LOCAL_PATH))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With