ASP源码.NET源码PHP源码JSP源码JAVA源码DELPHI源码PB源码VC源码VB源码Android源码
当前位置:首页 >> 网络编程 >> Android开发 >> android studio在编辑时出现如Failed to sync Gradle project类似的问题时的解决方案

android studio在编辑时出现如Failed to sync Gradle project类似的问题时的解决方案(1/4)

来源:网络整理     时间:2016-01-10     关键词:

本篇文章主要介绍了"android studio在编辑时出现如Failed to sync Gradle project类似的问题时的解决方案",主要涉及到方面的内容,对于Android开发感兴趣的同学可以参考一下: 最近使用android studio发现环境坏了,提示如下:Failedto sync Gradle project’XXXXX’Error:Unable to...

最近使用android studio发现环境坏了,提示如下:

Failedto sync Gradle project’XXXXX’

Error:Unable to load class'asLocalRepo0_1r7i3nvnipez3xbls4oy6h797'.

Possible causes for this unexpected errorinclude:<ul><li>You are using JDK version 'java version"1.7.0_67"'. Some versions of JDK 1.7 (e.g. 1.7.0_10) may cause classloading errors in Gradle.

Please update to a newer version (e.g.1.7.0_67).

<a href="open.project.structure">OpenJDK Settings</a></li><li>Gradle's dependency cache may becorrupt (this sometimes occurs after a network connection timeout.)

<ahref="syncProject">Re-download dependencies and sync project(requires network)</a></li><li>The state of a Gradle buildprocess (daemon) may be corrupt. Stopping all Gradle daemons may solve thisproblem.

<ahref="stopGradleDaemons">Stop Gradle build processes (requiresrestart)</a></li><li>Your project may be using a third-partyplugin which is not compatible with the other plugins in the project or theversion of Gradle requested by the project.</li></ul>In the case ofcorrupt Gradle processes, you can also try closing the IDE and then killing allJava processes.

android studio在编辑时出现如Failed to sync Gradle project类似的问题时的解决方案

按上面的意思,可能是jdk出问题了,所以查看了一下自己的jdk版本:1.7.0.67,已经是了呀,后来我读这段英语才明白,它的意思是jdk1.7(无论是1.7.0_10还是1.7.0.67,还是别的1.7.XXX)类型的可能都会导致使用Gradle工具类加载错误,所以就去下载个最新版的吧,我写的现在最新版是jdk 1.8,下载地址: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

如图:

android studio在编辑时出现如Failed to sync Gradle project类似的问题时的解决方案

相关图片

相关文章