LeakCanary Android 内存泄漏分析利器 源码编译配置mk文件

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, src/leakcanary-1.5.3/leakcanary-analyzer/src/main/java #添加源码资源文件位置 )
LOCAL_SRC_FILES += $(call all-java-files-under, src/leakcanary-1.5.3/leakcanary-android/src/main/java)
LOCAL_SRC_FILES += $(call all-java-files-under, src/leakcanary-1.5.3/leakcanary-watcher/src/main/java)
LOCAL_PROGUARD_ENABLED := disabled

#    $(call all-java-files-under, GomeRess/src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \
    $(LOCAL_PATH)/src/leakcanary-1.5.3/leakcanary-android/src/main/res #添加leakcanary源码文件

LOCAL_STATIC_JAVA_LIBRARIES :=  android-support-v4 \
        android-support-v13 \
        android-support-v7-recyclerview \
        android-support-design \
        android-support-v7-appcompat \
        haha \ #添加引用库对应的
#LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_AAPT_FLAGS := --auto-add-overlay --extra-packages (自己应用包名)
LOCAL_AAPT_FLAGS += --extra-packages com.squareup.leakcanary #添加leakcanary

LOCAL_PACKAGE_NAME := 生成apk的名字
LOCAL_PRIVILEGED_MODULE := true
LOCAL_CERTIFICATE := platform
#LOCAL_DEX_PREOPT := false

include $(BUILD_PACKAGE)

include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := ds:libs/ds.jar \
   haha:libs/haha-2.0.3.jar #添加引用库

LOCAL_MODULE_TAGS := optional
include $(BUILD_MULTI_PREBUILT)

你可能感兴趣的:(Android,leakcanary配置mk)