将一个项目更新为新的gradle-plugin(14.0.2)后,我在Android-Studio中遇到问题:
Error:Cause: java.io.File cannot be cast to org.gradle.api.artifacts.Configuration
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 may be corrupt.
<a href="stopGradleDaemons">Stop Gradle daemons and sync project</a></li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
我尝试了所有建议但没有成功.此项目在控制台上构建良好 – 有点卡在这里.任何提示都可以提供帮助.
解决方法:
可以通过更改来修复此类错误
plusConfigurations += project.configurations.compile
至:
plusConfigurations += [ project.configurations.compile ]
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。