原文地址:https://blog.youkuaiyun.com/qq_34115898/article/details/79061475
Now you will probably get this error if you haven’t upgraded the gradle library in the gradle-wrapper.properties file.
Could not find method google() for arguments [] on repository container.
So, let’s replace this line in the gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
with this line
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
Then do a clean and rebuild, everything should work now.
本文介绍了一种常见的Gradle配置问题及其解决方案。当使用过时的Gradle版本时,可能会遇到找不到方法google()的错误。文章提供了更新gradle-wrapper.properties文件的具体步骤,通过将Gradle版本从2.14.1升级到4.1,可以解决该问题。
1639

被折叠的 条评论
为什么被折叠?



