Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – java.io.File无法强制转换为org.gradle.api.artifacts.Configuration大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
一个项目更新为新的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.

我尝试了所有建议但没有成功.此项目在控制台上构建良好 – 有点卡在这里.任何提示都可以提供帮助.

解决方法

可以通过更改来修复此类@L_489_8@

plusConfigurations += project.configurations.compile

至:

plusConfigurations += [ project.configurations.compile ]

大佬总结

以上是大佬教程为你收集整理的android – java.io.File无法强制转换为org.gradle.api.artifacts.Configuration全部内容,希望文章能够帮你解决android – java.io.File无法强制转换为org.gradle.api.artifacts.Configuration所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。