Android 热修复Tinker框架

Tinker

Tinker接入测试

  1. 首先通过assmeble打包(通过run打包作为bakApk时,差异包可能编译出错)
    在这里插入图片描述
    在这里插入图片描述

  2. 安装这个基准包。

  3. 修改代码后,打包补丁包。(注意需要在app.gradle中配置基准包信息)

ext {
    
    
    //for some reason, you may want to ignore tinkerBuild, such as instant run debug build?
    tinkerEnabled = true

    //for normal build
    //old apk file to build patch apk
    tinkerOldApkPath = "${
      
      bakPath}/app-debug-1028-13-26-09.apk"
    //proguard mapping file to build patch apk
    tinkerApplyMappingPath = "${
      
      bakPath}/app-debug-1028-13-26-09-mapping.txt"
    //resource R.txt to build patch apk, must input if there is resource changed
    tinkerApplyResourcePath = "${
      
      bakPath}/app-debug-1028-13-26-09-R.txt"

    //only use for build all flavor, if not, just ignore this field
    tinkerBuildFlavorDirectory = "${
      
      bakPath}/app-1028-13-26-09"
}

在这里插入图片描述
在这里插入图片描述

问题

  • 混淆问题
    cannot be mapped to ‘a’ because it is in conflict with an existing member with the same signature
    解决办法:禁用R8

猜你喜欢

转载自blog.csdn.net/yu540135101/article/details/127545238