Android源码编译环境中集成leakcanary内存泄露检测

2018-11-28  本文已影响0人  null_nullptr

Android.mk修改

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)
LOCAL_STATIC_JAVA_AAR_LIBRARIES := leakcanary-android-aar leakcanary-watcher-aar leakcanary-analyzer-aar
LOCAL_STATIC_JAVA_LIBRARIES := haha
LOCAL_MODULE_TAGS := optional
LOCAL_AAPT_FLAGS := \
              --auto-add-overlay \
              --extra-packages com.squareup.leakcanary
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := XXXXX
include $(BUILD_PACKAGE)

include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := haha:libs/haha-2.0.3.jar\
            leakcanary-android-aar:libs/leakcanary-android-1.5.aar\
            leakcanary-watcher-aar:libs/leakcanary-watcher-1.5.aar \
            leakcanary-analyzer-aar:libs/leakcanary-analyzer-1.5.aar
include $(BUILD_MULTI_PREBUILT)

include $(call all-makefiles-under,$(LOCAL_PATH))
上一篇 下一篇

猜你喜欢

热点阅读