错误:(29,13)无法解决:com.squareup.picasso:picasso:2.5.2

时间:2017-07-18 17:04:04

标签: android gradle

在android studio中,Gradle项目无法同步并导致此错误。

  

错误:(29,13)无法解决:com.squareup.picasso:picasso:2.5.2

这是我的build.gradle(模块)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.user.popularmovies"
        minSdkVersion 10
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
    {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:cardview-v7:24.2.1'
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support:preference-v7:25.0.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:design:23.1.1'
}

这是我的build.gradle(项目)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

2 个答案:

答案 0 :(得分:1)

这是代理身份验证, {{1}}

检查图像

enter image description here

答案 1 :(得分:0)

检查您的互联网连接,并确保禁用gradle offline工作。

<强>文件&gt;设置&gt;构建,执行,部署和GT;摇篮

禁用&#34;离线工作&#34;复选框。