Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'build.gradle'
这段话的大概意思就是:比起在 build.gradle(project)下配置,在 setting.gradle 下配置更合适,但是 build.gradle 却配置了 maven 。
在报错提示下,去查看project的build.gradle,发现配置了 maven,解决办法就是把 allprojects 闭包下的内容全部转移到 setting.gradle 配置文件中。
如下图:文章来源:https://www.toymoban.com/news/detail-773550.html
把 allproject 闭包转移到 setting.gradle 之后,重新编译运行即可。文章来源地址https://www.toymoban.com/news/detail-773550.html
到了这里,关于Build was configured to prefer settings repositories over project repositories的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!