Gradle构建报错解决:ERROR: Unable to find method 'org.gradle.api.artifacts.Configuration.isCanBeResolved()Z'.

2020/08/01 行走的问题解决机 共 872 字,约 3 分钟


>ERROR: Unable to find method 'org.gradle.api.artifacts.Configuration.isCanBeResolved()Z'.
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.


解决方法是File->Settings->Build->Build Tools->Gradle

配置项目的gradle路径和Gradle JVM,先尝试使用IDEA自带的高版本gradle,如果项目中有指定gradle版本,选择项目指定的版本,如果还不行,可以尝试使用本地的gradle。



Table of Contents