Reputation: 317
Fabric was successfully working on my project. On some day suddenly it started giving me error "Error:(18, 0) Plugin with id 'io.fabric' not found
". I checked everything, but it was correctly integrated. Please help and give solution
Outer build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
Inner build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
Upvotes: 4
Views: 4496
Reputation: 6166
You need to add classpath in outer build.gradle file like this
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
Complete outer build.gradle file look like below
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
// Add more class path here as per your project requirement
classpath 'io.fabric.tools:gradle:1.+'
}
}
Upvotes: 2