首页 > 解决方案 > 如何解决“gradle failed resolve”?

问题描述

无法编译,也无法在我的库中看到。

错误

gradle failed resolve `com.theartofdev.edmodo:android-image-cropper:+” Compilation fails.

build.gradle代码

apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.backuppc.breathanalyzer"
        minSdkVersion 23
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"

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

依赖项

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'com.theartofdev.edmodo:android-image-cropper:+'

}

标签: androidbuildbuild.gradle

解决方案


请更换

compile 'com.theartofdev.edmodo:android-image-cropper:+'

最新版本

compile 'com.theartofdev.edmodo:android-image-cropper:2.8.0'

请确保依赖项是最新版本。您可以在这里获取最新版本: https ://bintray.com/package/files/arthurhub/maven/Android-Image-Cropper?order=asc&sort=name&basePath=com%2Ftheartofdev%2Fedmodo%2Fandroid-image-cropper&tab=files

希望这可以帮助..


推荐阅读