zoukankan      html  css  js  c++  java
  • 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的版本号走的

  • 相关阅读:
    【入门OJ】2003: [Noip模拟题]寻找羔羊
    vue history模式 ios微信分享坑
    JS预解释
    vuex存储和本地存储(localstorage、sessionstorage)的区别
    call、apply、bind
    正则表达式常用元字符
    微信公众号自定义菜单跳转到相关联小程序
    javaScript运动框架之缓冲运动
    javaScript运动框架之匀速运动
    js事件冒泡、阻止事件冒泡以及阻止默认行为
  • 原文地址:https://www.cnblogs.com/yue31313/p/7421094.html
Copyright © 2011-2022 走看看