Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
2017-04-14 09:28
459 查看
Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to
这个是打开Android Studio项目报的错误提示,单纯从上面的提示还是不能太直接的知道什么问题。后来我想这个项目的Gradle版本与我当前AS使用的版本不一致,可能是这个问题。于是我把项目的版本改成与AS一致再同步一下,果然就好了。
改成
注意这个版本号是随AS的版本号走的,比如我当前使用的是2.3.1版本。
Error:The SDK Build Tools revision (23.0.3) is too low for project ‘New Unity Project’. Minimum required is 25.0.0
这个错误提示就比较明显了,说你当前项目使用的SDK版本太低了,需要改成25.0.0。改完之后再同步一下就可以了。
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.
这个是打开Android Studio项目报的错误提示,单纯从上面的提示还是不能太直接的知道什么问题。后来我想这个项目的Gradle版本与我当前AS使用的版本不一致,可能是这个问题。于是我把项目的版本改成与AS一致再同步一下,果然就好了。
classpath 'com.android.tools.build:gradle:2.1.0'
改成
classpath 'com.android.tools.build:gradle:2.3.1'
注意这个版本号是随AS的版本号走的,比如我当前使用的是2.3.1版本。
Error:The SDK Build Tools revision (23.0.3) is too low for project ‘New Unity Project’. Minimum required is 25.0.0
Error:The SDK Build Tools revision (23.0.3) is too low for project 'New Unity Project'. Minimum required is 25.0.0 <a href="fix.build.tools.version">Update Build Tools version and sync project</a><br><a href="openFile:D:/Xanthuim/Unity/New Unity Project/AS/New Unity Project/build.gradle">Open File</a>
这个错误提示就比较明显了,说你当前项目使用的SDK版本太低了,需要改成25.0.0。改完之后再同步一下就可以了。
相关文章推荐
- 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