我今天在启动 Android studio 时遇到了这个错误:
Error:Unable to find method 'org.gradle.api.tasks.Sync.getInputs()Lorg/gradle/api/internal/TaskInputsInternal;'.
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.
我正在使用 Android Studio Canary 2.3,这是我的 gradle 版本:
classpath 'com.android.tools.build:gradle:2.3.0-alpha3'
我尝试了建议的解决方案,但没有一个奏效。关于如何解决的任何建议?
最佳答案
使用 gradle --version
检查你的 gradle 版本。 Gradle 2.14.1 不再工作。
我将它更新到 3.2.1,这对我有用。
您可以从 gradle.org 获取最新的 gradle .或者如果使用包装器,请在 gradle-wrapper.properties
中更改您的版本。
关于android - Gradle 同步失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41152475/