【问题标题】:how to solve "gradle failed resolve com.theartofdev.edmodo:android-image-cropper:+"如何解决“gradle failed resolve com.theartofdev.edmodo:android-image-cropper:+”
【发布时间】:2016-08-28 00:58:25
【问题描述】:

我安装了新版本的 Android Studio“2.1.0.9”。现在当同步 gradle 错误信息出现在这个:

gradle failed resolve com.theartofdev.edmodo:android-image-cropper:+

我使用了任何版本的图像裁剪器,但仍然有这条消息。 毕业:

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.theartofdev.edmodo:android-image-cropper:2.0.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
}
android {
compileSdkVersion 'Google Apis:Google Apis:23'
buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
defaultConfig {  
    minSdkVersion 14
    targetSdkVersion 23
}

【问题讨论】:

  • 调用compile 'com.theartofdev.edmodo:android-image-cropper:2.0.+' 然后Clean and rebuild 你的项目
  • @IntelliJAmiya 建议会起作用。
  • @jaydroider 让我们看看会发生什么
  • @IntelliJAmiya 这个错误仍然是:要求:MyProject:unspecified > 无法解析 com.theartofdev.edmodo:android-image-cropper:2.0.+。 > 无法列出 com.theartofdev.edmodo:android-image-cropper 的版本。 > 无法获取“jcenter.bintray.com/com/theartofdev/edmodo/…”。 > 与jcenter.bintray.com 的连接被拒绝 > 无法解析 com.theartofdev.edmodo:android-image-cropper:2.0.+。 > 无法列出 com.theartofdev.edmodo:android-image-cropper 的版本。
  • 好的@Tom 展示你的BUILD.GRADLE

标签: android android-studio gradle build.gradle


【解决方案1】:

你应该用这个替换依赖

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

对我有用

【讨论】:

    【解决方案2】:

    要解决这个问题,你所要做的就是访问这个链接

    https://bintray.com/package/files/arthurhub/maven/Android-Image-Cropper?order=asc&sort=name&basePath=com%2Ftheartofdev%2Fedmodo%2Fandroid-image-cropper&tab=files

    滚动到底部并将您的依赖项替换为最新版本。

    示例:如果以前您的依赖项是

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

    然后将其替换为(在发布答案时最新的是 2.4.7

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

    【讨论】:

      【解决方案3】:

      在 jcenter 中使用 mavenCentral 时会出现此问题,请勿更改 jcenter

      【讨论】:

        猜你喜欢
        • 2018-08-19
        • 2021-02-27
        • 2021-05-28
        • 2023-02-15
        • 2018-01-29
        • 1970-01-01
        • 2021-08-07
        • 1970-01-01
        • 2021-07-10
        相关资源
        最近更新 更多