AndroidDev
AndroidDev

Reputation: 739

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
}

Upvotes: 8

Views: 22440

Answers (14)

Hridoy Krisna Das
Hridoy Krisna Das

Reputation: 185

I have a solution for this error. Last week I faced this problem and now solve it by below solutions.

Downloadd 'aar' file from here.:

Then: Add this file to this folder: app -> libs (if not exist, create)

First Way: Add this code in build.gradle (App):

implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

Then: The Sync with gradle file. I think problem has solved.

Another way Add this code in build.gradle (Project):

allprojects {
    repositories {
        // others
        flatDir {
            dirs 'libs' // This is where your AAR file is located
        }

    }
}

Finally: Add this dependency in build.gradle (App):

implementation(name:'android-image-cropper-2.8.0',ext:'aar')

I think it will help all.

Upvotes: 0

MARIEJulio
MARIEJulio

Reputation: 21

Replace with

implementation 'com.github.arthurhub:android-image-cropper:2.8.0'

How i know it (ensure it's the right)

I search com.theartofdev.edmodo:android-image-cropper:2.3.0 The repository is https://github.com/ArthurHub/Android-Image-Cropper Then go to : https://jitpack.io and put https://github.com/ArthurHub/Android-Image-Cropper in search. You will see how put dependencies in build.gradle

Upvotes: 0

Rohan
Rohan

Reputation: 177

Use

implementation 'com.github.alirezaafkar:Android-Image-Cropper:2.3.3'

Upvotes: -1

Adil Saiyad
Adil Saiyad

Reputation: 1592

I have added below code in build.gradle and it's working for me.

allprojects {
    repositories {
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
        google()
        jcenter()
    }
}

Upvotes: 0

Shafiq ur Rehman
Shafiq ur Rehman

Reputation: 254

Just update dependency version which is mention below:

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

Upvotes: 0

Jay Taravia
Jay Taravia

Reputation: 63

In settings.Gradle use jcenter() instead of mavenCentral(). And use newer version of CropImage.

Upvotes: 0

Cyrille Con Morales
Cyrille Con Morales

Reputation: 957

If someone still using it I fixed it using this

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

Add this to your AndroidManifest.xml

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

In settings.gradle

dependencyResolutionManagement {
   repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
   repositories {
       google()
       mavenCentral()
       jcenter()//Add this but this will give you deprecated API
   }
}

Add this in gradle.properties

android.enableJetifier=true

Upvotes: 0

Vikash Kumar
Vikash Kumar

Reputation: 11

implementation("com.vanniktech:android-image-cropper:4.3.3")

you can used this place of compile 'com.theartofdev.edmodo:android-image-cropper:2.4.7'

Upvotes: 0

Pranit Vedpathak
Pranit Vedpathak

Reputation: 1

change version don't use + if you use android studio bumblebee, go to setting.gradle, and add jcenter() :

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
    }
}

Upvotes: 0

Ganesh Garad
Ganesh Garad

Reputation: 391

Replace Library with

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

Avoid using '+' sign in last.

Upvotes: 0

Mohamed Imran
Mohamed Imran

Reputation: 710

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"

Upvotes: 5

Moha.AZ
Moha.AZ

Reputation: 1862

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

Upvotes: 0

RAHUL PANDEY
RAHUL PANDEY

Reputation: 141

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'

Upvotes: 3

you should to replace the dependency by this

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

it'works for me

Upvotes: 7

Related Questions