2016-12-14 131 views
2

我今天得到這個錯誤啓動Android的工作室時:失敗的搖籃同步

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中金絲雀2.3和我的繼承人gradle這個版本:

classpath 'com.android.tools.build:gradle:2.3.0-alpha3' 

我嘗試了建議解決方案但沒有工作。有關如何解決的任何建議?

回答

12

gradle --version檢查您的gradle版本。 Gradle 2.14.1不再工作。

我更新到3.2.1,這對我很有用。

您可以從gradle.org獲得最新的gradle。如果使用包裝,則在gradle-wrapper.properties中更改您的版本。