我在将一个项目更新到新的Gradle插件(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.
我尝试了所有建议,但仍然没有成功。同时,在控制台上构建此项目很顺利——我有点卡在这里了。任何提示都可能会有所帮助。
+
还是+=
吗? - Peter Niederwieser