Could not find method google() for arguments [] on repository container 问题解决

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.

参考

https://blog.csdn.net/qq_34115898/article/details/79061475

    原文作者:KT_11
    原文地址: https://www.jianshu.com/p/bb1848523d21
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞