http://blog.csdn.net/FlyRabbit_1/article/details/74536317

Error: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.

Error: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.

解决方法:将

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3' // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
 classpath 'com.android.tools.build:gradle:2.3.3'

要与Android stduio 的版本号保持一致即可

Android studio Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to的更多相关文章

  1. Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to...异常处理

    这个是打开Android Studio项目报的错误提示,单纯从上面的提示还是不能太直接的知道什么问题.后来我想这个项目的Gradle版本与我当前AS使用的版本不一致,可能是这个问题. 修改build. ...

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

    转载请注明出处:http://www.cnblogs.com/cnwutianhao/p/6709758.html Android Studio导入项目报错: org.gradle.api.inter ...

  3. 我的Android进阶之旅------>解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.g

    错误描述 今天在Github上面下载了一份代码,然后导入到Android Studio中直接报了如下图所示的错误: 错误描述如下: Error: Unable to find method 'org. ...

  4. 我的Android进阶之旅------>解决Error:Could not find property 'compile' on org.gradle.api.internal.artifacts.

    1错误描述 解决方法 1错误原因 2解决方法 1.错误描述 刚刚,Android Studio突然编译不了了,报了如下错误: Error:Could not find property 'compil ...

  5. 解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.

    错误描述今天在Github上面下载了一份代码,然后导入到Android Studio中直接报错误 错误描述如下: Error: Unable to find method ‘org.gradle.ap ...

  6. Android : Android Studio 更新至gradle 4.10.1后Variants API变化

    同步警告: WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'v ...

  7. 拥抱 Android Studio 之五:Gradle 插件开发

    实践出真知 笔者有位朋友,每次新学一门语言,都会用来写一个贪吃蛇游戏,以此来检验自己学习的成果.笔者也有类似体会.所谓纸上得来终觉浅,绝知此事要躬行.这一章,笔者将以开发和发布一个 Gradle 插件 ...

  8. android studio Error:java.lang.OutOfMemoryError: GC overhead limit exceeded

    android studio Error:java.lang.OutOfMemoryError: GC overhead limit exceeded 在app下的build.gradle中找到and ...

  9. android studio error configuration with name default not found

    Android Studio报错: android studio error configuration with name default not found 在进行sync的时候,提示Error: ...

随机推荐

  1. WPF自定义产品框架

    在讲解之前先看一下效果,有助于理解: 这是客户端的效果图.整个产品分为两部分:1.WPF开发的展示效果的客户端   2.WCF开发的提供数据服务接口的服务端   本章主要讲解一下实际中开发WPF开发客 ...

  2. 如何打包静态库.framework文件 iOS

    代码调试好了开始打包成sdk,下面是将要打包的FRSDK代码(FRSDK.h暴露在外面有别人调用) 1.创建新工程(Xcode File-New-Project) 2.把下面的红色框的东西移除 3.将 ...

  3. staticmethod、classmethod的使用

    staticmethod 首先要明白两个概念 绑定方法:但凡是定义在类的内部,并且没有被任何装饰器修饰过的方法,就是绑定方法,并且有自动传值功能.类直接调用该方法时,改方法叫做类的函数属性:对象在调用 ...

  4. UWP 邮件反馈

    在我们构建App的时候,一个很人性化的设计就是增加邮件反馈渠道,就是让用户直接发邮件给你反馈. 当然,你也可以用系统自带的"反馈中心"(超级无敌难用,还经常打不开),或者使用商店的 ...

  5. linux系统下安装配置解压版的MySQL数据库

    一.解压文件到当前目录 命令:tar -zxvf mysql....tar.gz 二.移动解压完成的文件夹到目标目录并更名mysql 命令:mv mysql-版本号 /usr/local/mysql ...

  6. 使用PowerApps快速构建基于主题的轻业务应用 —— 进阶篇

    作者:陈希章 发表于 2017年12月14日 在上一篇 使用PowerApps快速构建基于主题的轻业务应用 -- 入门篇 中,我用了三个实际的例子演示了如何快速开始使用PowerApps构建轻业务应用 ...

  7. 【Keras】从两个实际任务掌握图像分类

    我们一般用深度学习做图片分类的入门教材都是MNIST或者CIFAR-10,因为数据都是别人准备好的,有的甚至是一个函数就把所有数据都load进来了,所以跑起来都很简单,但是跑完了,好像自己还没掌握图片 ...

  8. MySQL数据库数据信息迁移

    环境内核信息: [root@zabbix-01 ~]# uname -a Linux lodboyedu-01 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:2 ...

  9. hdu 1233 还是畅通project(kruskal求最小生成树)

    还是畅通project Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  10. Winform开发框架中工作流模块的表设计分析

    在较早博客随笔里面写过文章<Winform开发框架之简易工作流设计>之后,很久没有对工作流部分进行详细的介绍了,本篇继续这个主题,详细介绍其中的设计.实现及效果给大家,这个工作流在好几年前 ...