希望你們今天過得愉快!
我目前正在開發一個使用舊版本 Gradle 的專案,特別是 Gradle 3.0。因此,我安裝了舊版本并在 Intellij 中將其設定為 Gradle Settings 中的源。然而,完成之后,我點擊了構建,它立即開始下載索引檔案。下載完成后立即出現以下錯誤代碼:
Unable to find method 'org.gradle.api.invocation.Gradle.getIncludedBuilds()Ljava/util/Collection;'
org.gradle.api.invocation.Gradle.getIncludedBuilds()Ljava/util/Collection;
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.
然后我按照它的建議繼續重新下載,并同樣重新啟動,但在再次構建專案后,它給出了同樣的錯誤。
我真的不知道我哪里錯了。我附上了我的 gradle 設定的影像和我的 IDE 的影像。
同樣出于好奇,正如您在影像中看到的,在專案目錄中:有這么多 gradle 版本,這些是什么意思?它像自動從 2.14 到 7.5.1 一樣嗎?我不知道為什么。
任何幫助將不勝感激!!再次感謝你!


uj5u.com熱心網友回復:
您可以嘗試在 intellij 上使快取和重新啟動選項無效
uj5u.com熱心網友回復:
從您的 IDE嘗試File->Invalidate Caches,或者您可以.idea從 src 檔案夾中洗掉檔案并再次運行該專案。
uj5u.com熱心網友回復:
僅從 Gradle 3.1 版本開始支持getIncludedBuilds方法,如檔案所示。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/503843.html
下一篇:'com.gorylenko.GenerateGitPropertiesTask'屬性'gitProperties'缺少輸入或輸出注釋?
