Build was configured to prefer settings repositories over project repositories but repository ‘maven Love The Way You Lie 2024-04-03 10:11 18阅读 0赞 > 作者:非妃是公主 > 专栏:《Android》 > **个性签:顺境不惰,逆境不馁,以心制境,万事可成。——曾国藩** > > ![在这里插入图片描述][d0bfa39a9a884813bc663d20f2ed3229.jpeg] 主要是由于Android Studio版本过高,依赖配置有些变更,具体地是,在settings.gradle中配置镜像源,而不再是build.gradle(project)中配置。 解决方案如下: ① 在settings.gradle中的dependencyResolutionManagement中添加镜像源。 ![在这里插入图片描述][ba6401b1c6984aa1b3d2650c5ae12732.png] ② 还要删除build.gradle(project)中的原有镜像源。 ![在这里插入图片描述][36283a2a01014966999f832026b21958.png] [d0bfa39a9a884813bc663d20f2ed3229.jpeg]: https://image.dandelioncloud.cn/pgy_files/images/2024/04/03/c3d14e7d76764457b8a406a619b6dcb1.jpeg [ba6401b1c6984aa1b3d2650c5ae12732.png]: https://image.dandelioncloud.cn/pgy_files/images/2024/04/03/20473da5d1ce469c9361e146b7755e65.png [36283a2a01014966999f832026b21958.png]: https://image.dandelioncloud.cn/pgy_files/images/2024/04/03/8b5b40598fa343549082c95b702c9eb8.png
还没有评论,来说两句吧...