配置编译规则
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, app/src/main/java) LOCAL_MANIFEST_FILE := app/src/main/AndroidManifest.xml LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/app/src/main/res LOCAL_PACKAGE_NAME := GlobalKey LOCAL_CERTIFICATE := platform LOCAL_SYSTEM_EXT_MODULE := true LOCAL_VENDOR_MODULE := false # LOCAL_PROGUARD_FLAG_FILES := proguard.cfg LOCAL_PRIVATE_PLATFORM_APIS := true LOCAL_STATIC_ANDROID_LIBRARIES := \ com.google.android.material_material include $(BUILD_PACKAGE) include $(CLEAR_VERS) include $(call all-makefiles-under,$(LOCAL_PATH))
LOCAL_STATIC_ANDROID_LIBRARIES 指定apk在编译的时候用了哪些库,一般都编译在 out\soong\.intermediates\prebuilts\sdk\current\下,例如
com.google.android.material_material就在out\soong\.intermediates\prebuilts\sdk\current\extras\material-design-x\com.google.android.material_material\android_common\javac
配置的时候只需写 jar包的名称即可