Error:Failed to resolve: com.android.support或者Install Repository and sync project问题

今天在Android Studio中添加picasso依赖库时候遇到让我Install Repository and sync project的问题,先看错误信息截图:

compile 'com.squareup.picasso:picasso:2.71828'

点击Install Repository and sync project的时候没有任何响应,最后经过查找应该是配置仓库的问题,原因是一些第三方库都放在了Google的Maven资源库(maven.google.com)中,因此需要将此资源库配置到allprojects之中,添加如下代码即可。

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com'
        }
    }
}

猜你喜欢

转载自blog.csdn.net/Wang_WY/article/details/79654405