原文:Could not find method google() for arguments [] on repository container.

替換gradle wrapper.properties里面 distributionUrl https : services.gradle.org distributions gradle . all.zip 即可 ,這個為 gradle版本問題,低版本上無法識別google倉庫。 ...

2019-01-15 11:05 0 1498 推薦指數:

查看詳情

解決Gradle報錯Could not find method api() for arguments....

老項目用的Gradle引入依賴用的compile關鍵詞,升級Gradle 7.x版本后,這個關鍵詞被啟用了。 查了下文檔,如果項目的Jar包要對外暴露,就用api,如果引用的jar包只有本項目自己用 ...

Sun Dec 05 19:11:00 CST 2021 0 7770
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM