Gradle 项目刷新失败:已经完成 [英] Gradle project refresh failed: Already finished

查看:32
本文介绍了Gradle 项目刷新失败:已经完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:此时我已经与 Studio/Gradle 斗争了一天左右;最初有多个 PEBKAC 错误(即权限和资源限制)已得到解决.不幸的是,google-fu 由于当前的错误使我失败了.

Background: I've been fighting with Studio/Gradle for a day or so at this point; there were initially multiple PEBKAC errors (namely permissions and resource limits) that have since been resolved. Unfortunately the google-fu has failed me for this current error.

尝试完成未成功完成的./gradlew clean 时特别发生错误;它失败了大约 30 秒.

The error specifically occurred attempting to complete ./gradlew clean which did not complete successfully; it failed about 30s in.

我通过清除有问题的 git repo 并重新克隆它来暂时修复"这个问题.我发现错误似乎只发生在特定分支上(即切换到 x_branch,运行clean project",收到错误),但还没有弄清楚原因.在收到错误后尝试切换到另一个分支或回到 master 不会将 gradle 恢复到工作状态;错误仍然存​​在.

I temporarily 'fixed' the problem by blowing away the offending git repo and cloning it anew. I discovered the error seems to occur only on a specific branch (ie, switch to x_branch, run 'clean project,' receive error), but have not yet figured out why. Attempting to switch to another branch or back to master after receiving the error does not revert gradle back to a working state; the error remains.

错误:Gradle 项目刷新失败:错误:已经完成

系统环境:Android Studio 3.1//Gradle 版本 171.4250

System env: Android Studio 3.1 // Gradle version 171.4250

我的问题: 有没有人见过这个错误?这个错误是什么意思,我该如何防止它再次发生?

My question(s): Has anyone seen this error before? What does this error mean and how do I prevent it from re-occurring?

推荐答案

重启 Android studio :

Restarting Android studio :

文件 > 使缓存无效/重新启动对我有用

File > Invalidate Caches/Restart worked for me

这篇关于Gradle 项目刷新失败:已经完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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