Error:org.gradle.api.internal.changedetection.state.DefaultF

来源:互联网 发布:windows10怎么下载软件 编辑:程序博客网 时间:2024/05/16 15:27
Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionSnapshotImpl cannot be cast to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshotPossible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes. 



由于也是刚使用 Android Sutdio 不久,对其还不是特别熟悉,出现这个错误后,想尽了无数办法,删工程、重建、卸载、重装还是没用,于是我想到这跟 Android Studio 工具本身应该是没有关系了,于是我想到了.android 和.gradle,根据错误提示,我觉得有可能是.gradle 出现问题了,一不做二不休直接把.gradle 文件夹删了(该两文件夹一般在电脑的用户文件夹下),然后这个错误就不复存在了,.gradle 文件夹删了之后是会重新生成的,所有不用担心

这个错误浪费了我差不多两小时,现将其记录下来,谨以此为鉴。


1 0
原创粉丝点击