无法解决依赖 [英] Unable to resolve dependency

查看:36
本文介绍了无法解决依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建时,显示此错误:

无法解析:app@debug/compileClasspath"的依赖关系:可以无法解析 com.android.support:appcompat-v7:27.1.1.

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:27.1.1.

推荐答案

只需将附加图片中突出显示的存储库下的 google() 添加到您的项目 gradle 中,因为 google 已将其存储库移动到 maven 您必须以这种方式添加,希望对您有所帮助!!!或阅读此官方文档

Just add google() under repositories as highlighted in attached picture to your project gradle, as google has move its repositories to maven you have to add this way, hope this helps you!!! or read this official doc Support Library Setup

Gabriele Mariotti 的另一个不错的答案使用 google() 作为存储库不会'工作

Another nice asnwer by Gabriele Mariotti Using google() as a repository doesn't work

这篇关于无法解决依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆