Tinker版本号 v1.9.14.5 gradle: v3.5.3
Cause: tinkerId is not set !!!
原因:官方默认使用git提交记录作为 tinkerId。
解决方案:重新提交git 或者 修改gitSha() 返回值。
def gitSha() {
/* try {
String gitRev = 'git rev-parse --short HEAD'.execute(null, project.rootDir).text.trim()
if (gitRev == null) {
throw new GradleException("can't get git rev, you should add git to system path or just input test value, such as 'testTinkerId'")
}
return gitRev
} catch (Exception e) {
throw new GradleException("can't get git rev, you should add git to system path or just input test value, such as 'testTinkerId'")
} */
return android.defaultConfig.versionName
}
Compilation failed; see the compiler error output for details.
原因:使用gradlew compileDebugJavaWithJavac,查看原因。提示“无法访问Keep类,找不到android.support.annotation.Keep的类文件”
解决方案: 项目中使用了AndroidX,需要在gradlew.properties文件中添加
android.enableJetifier=true
com.tencent.tinker.build.util.TinkerPatchException: some loader class has been changed in new primary dex.
具体错误信息:操作步骤: 生成基准包后,修改BaseBuildInfo的静态属性,使用tinkerPathRelease出现此错误信息。
原因: