After add Fabric for crash report I can't add new libs in gradle

201 views Asked by At

I'm just installed the library Fabric for Crash monitoring, but now, I'm trying to add a library to rate your app (compile 'com.androidsx:rate-me:4.0.0') but now gradle stops showing that it failed to resolve the library.

buildscript {
    repositories {
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'android'
apply plugin: 'io.fabric'

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

dependencies {
    compile('com.crashlytics.sdk.android:crashlytics:2.3.2@aar') {
        transitive = true;
    }
    compile 'com.android.support:support-v4:22.1.1'
    compile files('libs/library-1.0.6.jar')
    compile files('libs/gcm.jar')
    compile files('libs/acra-4.6.1.jar')
    compile files('libs/acra-4.6.1-sources.jar')
    compile files('libs/acra-4.6.1-javadoc.jar')
    compile files('libs/TestFlightLib.jar')
    compile files('libs/crouton-1.8.4.jar')
    compile project(':LVL')
    compile files('libs/bugsense-3.5.jar')
    compile 'com.androidsx:rate-me:4.0.0'
}

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
    }
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        instrumentTest.setRoot('tests')
    }
}

The output:

Output

What is the problem?

1

There are 1 answers

0
Víctor Martín On

Solved:

  • jcenter() was missing inside repositories section.

Thanks.