Tinker和Instant Run的并存

问题:集成了bugly后台运行Instant Run就会报错:

Instant Run requires incremental dexing. Please remove 'ENABLE_DEX_ARCHIVE=false' from gradle.properties

解决方法:

第一步:

Tinker和Instant Run的并存

第二步:官方文档提供

Q: 日常调试需要使用instant run,怎么关闭tinker
A:这里分两种情况:
使用反射Application方式接入:可以直接在build.gradle中将apply from: 'tinker-support.gradle'注释掉。
改造Application方式接入:先将tinkerSupport中overrideTinkerPatchConfiguration设置为false,修改成将tinkerSupport中enable设置为false。

然并卵,正确操作如下:

1、 tinkerSupport中overrideTinkerPatchConfiguration设置为false。
2 、修改tinkerSupport中enable设置为false。
3 、将tinkerSupport中的buildConfig的tinkerId = "1.0.1-base" 这行打开注释(默认是被注释的)。

Tip: 记得需要更新的时候改回来就行