美文网首页
Android源码编译环境中集成leakcanary内存泄露检测

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

作者: null_nullptr | 来源:发表于2018-11-28 15:44 被阅读0次

    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))
    

    相关文章

      网友评论

          本文标题:Android源码编译环境中集成leakcanary内存泄露检测

          本文链接:https://www.haomeiwen.com/subject/lrlxvxtx.html