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.
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。改完之后再同步一下就可以了。
转载请注明原文地址: https://ju.6miu.com/read-671615.html