无法在Android Studio 3.0上使用Instant Run运行应用程序 [英] Can't run app with Instant Run on Android Studio 3.0

查看:402
本文介绍了无法在Android Studio 3.0上使用Instant Run运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已更新到Android Studio 3.0,现在我无法在启用即时运行的情况下运行该应用.

I've updated to Android Studio 3.0 and now I cannot run the app with Instant Run enabled.

由于java.io.FileNotFoundException,我得到任务执行失败",因为它找不到

I get 'Execution failed for task' due to a java.io.FileNotFoundException because it can't find the apk under

../build/intermediates/instant-run-resources/resources-production/

../build/intermediates/instant-run-resources/resources-production/

有什么想法可以克服这个问题,以便我可以使用Instant Run运行项目吗?

Any idea how to overcome this so that I can run the project with Instant Run?

我不确定在哪里找到丢失的apk文件或如何更改查找路径.

I'm not sure where to find the missing apk file or how to change the path to look for it in.

推荐答案

我找到了问题和解决方法.

I found the problem and the solution.

在我的情况下,原因是dexcount-gradle-plugin.该插件期望打包任务产生一个APK,但在Instant Run上不再如此.因此,他们发布了一个新版本,该版本在使用Instant Run运行时会禁用该过程.

In my case the cause was dexcount-gradle-plugin. The plugin is expecting that the package task produces an APK, but that is not true anymore on Instant Run. So they released a new version that disables the process when running with Instant Run.

所以我只需要将dexcount更新到最新版本.

So I just had to update dexcount to the latest version.

这篇关于无法在Android Studio 3.0上使用Instant Run运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆