导入第三方项目因gradle引起的不能运行问题
16lz
2021-01-26
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:
- 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.
是因gradle配置不对引起的原因
1.作为插件的gradle
2.作为gradle包的gradle:
Android Studio 里面配置的地方在这里:
需要注意可以有两种方法:
第一种是用wrapper的方法,也是android studio 推荐的方法,它会自动的去下载
第二种是手动下载后指定位置
更多相关文章
- Android(安卓)view中invalidate方法学习小节
- Android与HTML5交互模版
- Android(安卓)studio button 按钮 四种绑定事件的方法
- Android中的Parcelable接口和Serializable使用方法和差别
- Android线程安全问题分析与解决
- 王学岗OKHttp下载图片
- java 获取当前所有线程的两种方法 group和map
- Android(安卓)开发入门-常用控件的使用方法
- Android兼容性优化-8.0之后禁止在后台启动服务的兼容性优化