'how to solve "gradle failed resolve com.theartofdev.edmodo:android-image-cropper:+"

I install new version of Android Studio"2.1.0.9". Now when sync gradle error message in this:

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

I used any version of image cropper but still this message there is. gradle:

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
}


Solution 1:[1]

you should to replace the dependency by this

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

it'works for me

Solution 2:[2]

To solve this problem all you have to do is visit this link

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

scroll to the bottom and replace your dependency with the latest version.

example: if previously your dependency is

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

then replace it with (at the time of posting the answer the latest is 2.4.7)

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

Solution 3:[3]

Following steps worked for me after searching and finding solutions from various souces.

Step1: Add the following in AndroindManifest.xml at android/app/src/main

<activity
   android:name="com.canhub.cropper.CropImageActivity"
   android:theme="@style/Base.Theme.AppCompat">
</activity>

Step2: Add the below lines of code to /android/build.gradle

allprojects {
    repositories {
       .................................
        //noinspection JcenterRepositoryObsolete
        jcenter() {
            content {
                includeModule("com.theartofdev.edmodo", "android-image-cropper")
            }
        }
    }
}

Step3: Add the below line inside dependencies {} node in andoid/app/build.gradle

implementation "com.theartofdev.edmodo:android-image-cropper:2.8.0"

Solution 4:[4]

when use mavenCentral inside of jcenter you get this issue , dont change jcenter

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mohamed chiheb Ben jemaa
Solution 2 Neeraj Kumar
Solution 3 Mohamed Imran
Solution 4 Moha.AZ