Android Studio更新(3.1.1)和现在的应用程序将无法运行 [英] Android studio update (3.1.1) and now app won't run

查看:165
本文介绍了Android Studio更新(3.1.1)和现在的应用程序将无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以今天早上我将android studio更新到3.1.1,去更改一些代码并再次运行我的应用程序,但是我不断收到错误消息,不确定如何解决它,我已经在SO和Google上进行了搜索,但是避风港没有看到与此相关的任何信息.我也尝试过清理和重建,并且在尝试构建或运行应用程序时仍然遇到相同的错误.

So I updated my android studio this morning to 3.1.1 and went to change some code and run my app again but I keep getting errors and not sure how to fix it, I have searched on SO and with Google, but haven't seen anything that relates to this. I have also tried to clean and rebuild as well and still same errors when trying to build or run app.

org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:transformDexWithInstantRunDependenciesApkForDebug'.

Caused by: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:transformDexWithInstantRunDependenciesApkForDebug'

Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformDexWithInstantRunDependenciesApkForDebug' 

Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Failed to execute aapt 

Caused by: com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Failed to execute aapt

Caused by: com.android.ide.common.process.ProcessException: Failed to execute aapt

Caused by: java.util.NoSuchElementException

推荐答案

失败的任务是: :app:transformDexWithInstantRunDependenciesApkForDebug

尝试关闭即时运行":

  1. 打开SettingsPreferences对话框:在WindowsLinux上, 从菜单栏中选择文件>设置.在Mac OSX上,选择"Android" 菜单栏中的Studio>首选项.
  2. 导航到Build, Execution, Deployment > Instant Run.
  3. 取消选中,重新启动代码更改活动旁边的框.
  4. 重建.
  1. Open the Settings or Preferences dialog: On Windows or Linux, select File > Settings from the menu bar. On Mac OSX, select Android Studio > Preferences from the menu bar.
  2. Navigate to Build, Execution, Deployment > Instant Run.
  3. Uncheck the box next to Restart activity on code changes.
  4. Re-build.

这是 Google问题72811718 AS 3.1+中的一个错误

This is Google issue 72811718 a bug in AS 3.1+

这篇关于Android Studio更新(3.1.1)和现在的应用程序将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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