任务':app:countPlayUatDexMethods'的执行失败

问题描述 投票:1回答:1

在启用了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)

版本详情:

  • Android Studio:3.1.3
  • Android gradle插件:3.1.3
  • gradle包装:4.4
  • Kotlin插件:1.2.30
android-studio android-gradle build.gradle gradle-plugin android-instant-run
1个回答
1
投票

我找到了原因,这是解决方案。 dexcount-gradle-plugin是麻烦制造者。我将其版本更新为:

classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.3'

感谢this链接中的解决方案。

© www.soinside.com 2019 - 2024. All rights reserved.