Reputation: 739
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
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
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
Reputation: 177
Use
implementation 'com.github.alirezaafkar:Android-Image-Cropper:2.3.3'
Upvotes: -1
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
Reputation: 254
Just update dependency version which is mention below:
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
Upvotes: 0
Reputation: 63
In settings.Gradle use jcenter() instead of mavenCentral(). And use newer version of CropImage.
Upvotes: 0
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
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
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
Reputation: 391
Replace Library with
implementation 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
Avoid using '+' sign in last.
Upvotes: 0
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
Reputation: 1862
when use mavenCentral inside of jcenter you get this issue , dont change jcenter
Upvotes: 0
Reputation: 141
To solve this problem all you have to do is visit this link
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
Reputation: 546
you should to replace the dependency by this
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
it'works for me
Upvotes: 7