• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
韩亚飞_yue31313_韩梦飞沙
未来的某一天你会觉得现在所做的,大部分很烂,小部分很好
博客园    首页    新随笔    联系   管理    订阅  订阅

org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection

韩梦飞沙  韩亚飞  313134555@qq.com  yue31313  han_meng_fei_sha

错误:org.gradle.api.internal.tasks.DefaultTaskInputs $ TaskInputUnionFileCollection org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection不能投
可能导致这个意外错误的原因包括:分级的依赖缓存可能是损坏的(这有时是在网络连接超时之后发生的)。
重新下载依赖项和同步项目(需要网络)是一个等级的构建过程(守护进程)的状态可能会是腐败的。
停止所有的分级守护进程可以解决这个问题。
你的项目可能是使用一个与项目中其他插件不兼容的第三方插件,或者是项目所要求的等级版本的插件,而你的项目可能是在使用一个第三方插件来完成这个过程(需要重新启动)。
在腐败的分级过程中,您也可以尝试关闭IDE,然后杀死所有的Java进程。

 

错误:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
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><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

 ========

这个项目的Gradle版本与我当前AS使用的版本不一致,可能是这个问题。于是我把项目的版本改成与AS一致再同步一下,果然就好了。

classpath 'com.android.tools.build:gradle:2.1.3'

改成

classpath 'com.android.tools.build:gradle:2.3.1'

注意这个版本号是随AS的版本号走的

 

韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha
posted @ 2017-09-04 18:31  韩梦飞沙_韩亚飞  阅读(2666)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3