Android Studio更新带来的问题
来源:互联网 发布:foxpro怎么建数据库 编辑:程序博客网 时间:2024/06/16 19:06
I've recently updated the gradle version of my project from 2.14.1 to 3.0. Since then the gradle build is failing every time with this error:
Error:Cause: 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:
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
- 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.
One easy way to do this is to add the latest version of the build tools as a dependency in your build.gradle
file, for example:
dependencies { classpath 'com.android.tools.build:gradle:2.2.0-beta1'}
You can then run gradle tasks
and gradle will download everything you need.
After Android Studio 2.2 stable released on Sep 19 2016 , the latest version of the build tools is 2.2.0 . So you can fix it by :
dependencies { classpath 'com.android.tools.build:gradle:2.2.0'}
Another Person Solving:
Okay I got it working. For anyone facing the same problem the way it worked for me is as follows:
- Go to your external .gradle folder (for me it was C:\Users\drilon.gradle). Inside caches and daemon folder delete all the version folder (they look like this "2.14.1", or "3.0"). Also go to wrapper -> dists -> delete everything there.
- Inside your project root (for me it was C:\Users\drilon\AndroidStudioProjects\PorjectName) go to the .gradle folder and delete everything there.
- Rebuild the project
- Android Studio更新带来的问题
- Android studio 更新问题
- Android studio更新问题
- Android Studio离线更新的一些问题
- 更新Android Studio遇到的问题
- win10 更新会带来的问题
- Android Studio 1.4带来的福利
- Android Studio 1.4带来的福利
- Android Studio 2.0带来的新特性
- android studio依赖包带来的便捷
- android 硬件加速带来的问题
- Android Studio的更新
- Android Studio SDK更新问题
- Android Studio SDK 更新问题
- android studio gradle 更新问题
- Android Studio更新Gradle问题
- 解决Android studio更新问题
- Android SDK及Android Studio更新问题的解决方案
- sdut 3262 有向图强连通分量缩点模板
- 文章标题 Invitation Cards
- Ubuntu-JDK配置
- Spark实现SVM模型
- H5前端性能关键指标
- Android Studio更新带来的问题
- 线性表——数组描述
- file transfer(文档传送程序)-并查集的应用
- 深度学习(3):Convolutional Neural Networks
- CentOS6.5安装Docker
- 淘宝内部分享:MySQL & MariaDB性能优化
- Linux学习——文件搜索命令学习
- error while loading shared libraries: libpcre.so.0的解决办法
- 从源码解析TreeMap