1

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 :

  • Android Studio : 3.1.3
  • Android gradle plugin : 3.1.3
  • gradle wrapper : 4.4
  • Kotlin plugin : 1.2.30
Rakesh
  • 1,205
  • 1
  • 14
  • 33

1 Answers1

1

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.

Rakesh
  • 1,205
  • 1
  • 14
  • 33