I'm facing the following error while building the app in Android Studio 3.1.3 with Instant Run enabled.
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)
Log says :
: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)
Versions details :
I found the cause and it's solution. dexcount-gradle-plugin
was the trouble maker. I updated its version to :
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.3'
Thanks to the solution in this link.