2017-05-19 47 views
7

所以我試着從頭開始一個新的項目,Android Studio的新版本3。一切工作,直到它試圖建立該項目。然後,我收到以下錯誤消息:Gradle構建失敗,新的Gradle 3.0.0和Android Studio 3``

Error:Unable to find method 'org.gradle.tooling.model.gradle.GradleBuild.getIncludedBuilds()Lorg/gradle/tooling/model/DomainObjectSet;'. 
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. 

單擊任一解決方案都不會阻止它再次失敗。我甚至清空我的gradle home文件夾無濟於事。任何想法,爲什麼這是一個全新的項目,只有基本的模板沒有任何內容?

+1

刪除C .Gradle文件夾:/用戶/ YOURFOLDER/ –

+1

沒有工作@DivyeshPatel – axtscz

+0

嘗試無效/緩存和reastart機器人工作室和關閉互聯網一會兒 –

回答

1

如果您將Android Studio 3(或3.0.1)安裝到舊版本的相同文件夾中,會發生這種情況。

只需重命名(或刪除)舊文件夾,然後再解壓並重新安裝。

+0

我認爲這對我來說是正確的答案 – MewX