Android导入依赖失败

Android添加依赖失败报错

报错信息:

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.

解决办法:

1、打开setting.gradle

注:没有setting.gradle的打开build.gradle 

 2、在repositories中加入,两个都需要

maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}

3、Sync Now一下,就可以解决这个问题了!

猜你喜欢

转载自blog.csdn.net/m0_58241002/article/details/124931098