Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
2017-04-05 14:23
656 查看
导入工程时编译报错如下:
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.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
这是由于Gradle版本和Gradle插件的版本不一致导致的,版本对应如下
根据表格设置对应的版本,然后重新编译即可。
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.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
这是由于Gradle版本和Gradle插件的版本不一致导致的,版本对应如下
Plugin version | Required Gradle version |
---|---|
1.0.0 - 1.1.3 | 2.2.1 - 2.3 |
1.2.0 - 1.3.1 | 2.2.1 - 2.9 |
1.5.0 | 2.2.1 - 2.13 |
2.0.0 - 2.1.2 | 2.10 - 2.13 |
2.1.3 - 2.2.3 | 2.14.1+ |
2.3.0+ | 3.3+ |
相关文章推荐
- Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
- Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
- Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
- Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
- Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
- Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
- org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.g
- org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
- [Android]解决org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be ca
- android Gradle 编译Error :Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileColl
- cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection异常报错
- Error:org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl cannot be cast to
- Error:org.gradle.api.internal.changedetection.state.FileCollectionSnapshotImpl cannot be cast to org
- Error:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api
- Error:org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter$FileCollectionS
- org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInput........
- unable to find method org.gradle.api.tasks.TaskInputs.file
- greendao 3.2.2配置的时候报错:Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;
- Error:Unable to load class ‘org.gradle.api.publication.maven.internal.DefaultMavenFactory’
- intellij编译报错:Internal error: com.intellij.psi.tree.IFileElementType cannot be cast to com.intellij.psi.tree.IStubFileElementType