Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics Error:(11, 0) Plugin with id 'io.fabric' not found compile lib

Tags:

crashlytics

I am getting the error,

Error:(11, 0) Plugin with id 'io.fabric' not found

when trying to run crashlytics on my project.

like image 481
JenniferG Avatar asked Dec 20 '14 12:12

JenniferG


5 Answers

I faced the same issue, when tried to use Fabric plugin for android studio(automated code generation by plugin).I followed this documentation also.

And finally, I could see there were some missed lines in build.gradle.

So this is the top level project build.gradle

 // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
            jcenter()
            maven { url 'https://maven.fabric.io/public' }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:1.2.3'
            classpath 'io.fabric.tools:gradle:1.+'
        }
    }
apply plugin: 'java'
    allprojects {
        repositories {
            jcenter()
            maven { url 'https://maven.fabric.io/public' }
        }
    }

and this is the build.gradle for app module

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

    android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "your application package name"
        minSdkVersion 10
        targetSdkVersion 22
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.google.code.gson:gson:2.3'
    compile 'com.android.support:support-v4:22.0.0'
    testCompile 'junit:junit:4.12'
    testCompile "org.mockito:mockito-core:1.9.5"
    compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
        transitive = true;
    }
}

and at last "clean build" and all was set for me.

like image 78
Nicks Avatar answered Oct 04 '22 17:10

Nicks


I ended up creating an empty project and using the plugin on it and then I compared the gradle file and realized that this was not being added

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
like image 36
JenniferG Avatar answered Oct 04 '22 17:10

JenniferG


in your project gradle file:

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

in your app gradle file:

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

    android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "your application package name"
        minSdkVersion 10
        targetSdkVersion 22
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.google.code.gson:gson:2.3'
    compile 'com.android.support:support-v4:22.0.0'
    testCompile 'junit:junit:4.12'
    testCompile "org.mockito:mockito-core:1.9.5"
    compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
        transitive = true;
    }
}
like image 42
Nagashree Avatar answered Oct 04 '22 16:10

Nagashree


You just forget to add below mentioned line in Project level gradle file.

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

Also please add below mentioned line in dependencies (in project level gradle file)

classpath 'io.fabric.tools:gradle:1.26.1'
like image 33
Mohini Thakkar Avatar answered Oct 04 '22 17:10

Mohini Thakkar


I think you lost "google()" in repositories of buildscript.

buildscript {
    repositories {
        jcenter()
        google()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}
like image 38
Meng Lang Avatar answered Oct 04 '22 16:10

Meng Lang