3

I am trying to implement the gradle:

compile 'com.edmodo:cropper:1.0.2' 

..in my project and I keep getting an error when the Gradle is building. The error I get is:

Error:(36, 13) Failed to resolve: com.edmodo:cropper:1.0.2

That's all it displays and it doesn't even display a reason. I referred to THIS answer as well, but the error persists. Why does this error normally occur?

EDIT:

My build.gradle:

buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } 

EDIT:

App module

apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" useLibrary 'org.apache.http.legacy' defaultConfig { applicationId "com.myapp.testapp" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" multiDexEnabled true } dexOptions { javaMaxHeapSize "4g" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.google.code.gson:gson:2.3' compile 'com.google.guava:guava:18.0' compile 'com.googlecode.android-query:android-query:0.25.9' compile 'com.google.android.gms:play-services:8.3.0' compile 'com.google.android.gms:play-services-gcm:8.3.0' compile 'com.edmodo:cropper:1.0.2' } 
2
  • post your build.gradle Commented Jan 29, 2016 at 5:50
  • 1
    @IntelliJAmiya Edited Commented Jan 29, 2016 at 5:51

2 Answers 2

3

You can use compile 'com.edmodo:cropper:1.0.1'

build.gradle

 repositories { mavenCentral() } dependencies { compile 'com.edmodo:cropper:1.0.1' } 

Then Clean-Rebuild-Restart-Sync Your Project .

Sign up to request clarification or add additional context in comments.

8 Comments

The 1.0.1 version has some bugs. I need the latest version :)
Btw which section should I add the mavenCentral() code line? There's two repositories in my gradle. One in the buildscript and another in the allprojects
classpath 'com.android.tools.build:gradle:2.0.0-alpha2'
Because of this (github.com/edmodo/cropper/issues/21) issue, I need the 1.0.2. They say they have fixed it in the 1.0.2 version
Edited the App Module
|
0

With Gradle 2.2.2, add following into projectname.gradle file:

allprojects { repositories { jcenter() maven { url "https://repo.commonsware.com.s3.amazonaws.com" } maven { url "https://jitpack.io" } } } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.