在启用了Instant Run的Android Studio 3.1.3中构建应用程序时,我遇到以下错误。
Execution failed for task ':app:countPlayUatDexMethods'.
> java.io.FileNotFoundException: C:\Users\Rakesh\Desktop\appWorkspace\app\build\intermediates\instant-run-resources\resources-play\UAT-PLAY.apk (The system cannot find the file specified)
日志说:
:app:countPlayUatDexMethods FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:countPlayUatDexMethods'.
> java.io.FileNotFoundException: C:\Users\Rakesh\Desktop\appWorkspace\app\build\intermediates\instant-run-resources\resources-play\UAT-PLAY.apk (The system cannot find the file specified)
版本详情:
我找到了原因,这是解决方案。 dexcount-gradle-plugin
是麻烦制造者。我将其版本更新为:
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.3'
感谢this链接中的解决方案。