Fabric已成功处理我的项目。突然有一天它开始给我错误“Error:(18, 0) Plugin with id 'io.fabric' not found
”。我检查了一切,但它已正确集成。请帮忙解决问题
外部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'
答案 0 :(得分:2)
您需要在外部build.gradle文件中添加类路径,如此
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
完整的外部build.gradle文件如下所示
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.+'
}
}