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.

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

解决方法:

可以通过更改来修复此类错误

plusConfigurations += project.configurations.compile

至:

plusConfigurations += [ project.configurations.compile ]

相关文章

安装环境都很简单,就是下载工具需要在华为开发者联盟里注册...
上传的方式有两种,第一种是通过bintray官方出的插件bintray...
转载自: 完美解决Error:SSLpeershutdownincorrectly打开gr...
https://www.jianshu.com/p/9220227cdfb3buildscript{ext.ko...
Markdown版本笔记我的GitHub首页我的博客我的微信我的邮箱My...
 跟着教程做的,已经有了JDK,直接进行后面的步骤,下载安装...