Gradle的依赖关系缓存可能已损坏(有时发生在网络连接超时之后)。 [英] Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

查看:2386
本文介绍了Gradle的依赖关系缓存可能已损坏(有时发生在网络连接超时之后)。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 错误:无法加载class'org.gradle .tooling.internal.protocol.test.InternalTestExecutionConnection。 
这种意外错误的可能原因Gradle的依赖关系缓存可能已损坏(有时会在网络连接超时后发生)
重新下载依赖关系并同步项目(需要网络)Gradle构建过程的状态(守护进程)可能已损坏。停止所有的Gradle守护进程可能会解决这个问题。
停止Gradle构建过程(需要重新启动)您的项目可能使用与项目中的其他插件或项目请求的Gradle版本不兼容的第三方插件。在发生损坏的Gradle过程,你也可以尝试关闭IDE,然后杀死所有的Java进程。


解决方案

将我的gradle插件更新为3.3,这导致我正在运行的项目出现问题。
我已经通过了所有的Stack解决方案,除了这个解决方法之外,没有任何解决方法:
我在这个gradle-wrapper.properties中更改了我的分发URL。

  distributionUrl = https\://services.gradle.org/distributions/gradle-3.4.1-all.zip 

我的项目正在运行,它只是要求我更新到 gradle构建工具25.0.0 我这样做了。 )
$ b


  1. 转到项目部分并选择gradle scripts菜单。

  2. 在脚本下,选择gradle -wrapper.properties

  3. 然后将distributionUrl = https://services.gradle.org/distributions/gradle-2.2-all.zip替换为distributionUrl = https ://services.gradle.org/distributions/gradle-3.4.1-all.zip


注意:发行版gradle将根据android studio的版本进行更改。


I am getting this kind of error, how to fix it.

Error:Unable to load class 'org.gradle.tooling.internal.protocol.test.InternalTestExecutionConnection'.
Possible causes for this unexpected error Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

解决方案

I updated my Android Studio to 2.3 and it asked me to update my gradle plugin to 3.3 that created issues with my running projects. I've gone through all the Stack solutions and nothing worked for me except this workaround: I changed my distribution url in gradle-wrapper.properties with this one.

distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

My project is up and running.It just asked me to update to gradle build tools 25.0.0 which I did so. Everything is fine now :)

  1. Go to the project section and select gradle scripts menu.
  2. Under script, menu select gradle -wrapper.properties
  3. Then replace the distributionUrl=https://services.gradle.org/distributions/gradle-2.2-all.zip with "distributionUrl=https://services.gradle.org/distributions/gradle-3.4.1-all.zip"

note: distributions gradle will change depended upon the version of the android studio.

这篇关于Gradle的依赖关系缓存可能已损坏(有时发生在网络连接超时之后)。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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