简体   繁体   English

Android Studio Gradle无法构建

[英]Android Studio Gradle fails to build

I am facing this problem from some few days. 几天后我才面临这个问题。 When I try to build the project gradle thorws this message. 当我尝试构建项目gradle thorws这条消息时。 I cleaned the project re downloaded the dependencies but still problem has not be solved. 我清理了项目重新下载的依赖项,但仍然没有解决问题。

Help me to find out the fix. 帮我找出修复方法。

Error message 错误信息

:app:dexDebug
Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionSnapshotImpl cannot be cast to org.gradle.api.internal.changedetection.state.OutputFilesCollectionSnapshotter$OutputFilesSnapshot
Possible 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.

Similar problem like this one: Similiar question on stackoverflow 像这样的类似问题: stackoverflow上的类似问题

I solved my problem by following that answer. 我按照那个答案解决了我的问题。 Hope it will help you, too. 希望它也会对你有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM