解决Build was configured to prefer settings repositories over project repositories编译报错的问题
·
Android编译时出现如下报错:
Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'build.gradle'
原因是重复配置repositories导致的,所以解决方案就是删除多余的repositories定义,比如settings.gradle中的定义。可以全局搜索关键字:repositories,保证只在根目录的build.gradle中定义,其他gradle中的repositories定义删除即可。
更多推荐
已为社区贡献11条内容
所有评论(0)