Gradle项目刷新失败:已完成 [英] Gradle project refresh failed: Already finished
问题描述
这个错误特别发生在尝试完成 ./ gradlew clean
没有成功完成;它在30秒内失败了。
我通过吹掉违规的git repo并重新克隆它,暂时解决了问题。我发现这个错误似乎只发生在一个特定的分支上(例如,切换到x_branch,运行'clean project',接收错误),但还没有弄清楚为什么。试图在接收到错误后切换到另一个分支或返回到主控制器不会将gradle恢复到工作状态;错误仍然存在。
错误:
Gradle项目刷新失败:错误:已完成$系统环境
:Android Studio 3.1 // Gradle版本171.4250
$ b p> 我的问题:以前有没有人看过这个错误?
重新启动Android Studio:
文件>无效缓存/重新启动为我工作
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.
The error specifically occurred attempting to complete ./gradlew clean
which did not complete successfully; it failed about 30s in.
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.
Error:
Gradle project refresh failed: Error: Already finished
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?
Restarting Android studio :
File > Invalidate Caches/Restart worked for me
这篇关于Gradle项目刷新失败:已完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!