【发布时间】:2018-03-29 00:58:56
【问题描述】:
我正在关注 Fabric 官方文档来添加 crashlytic,我已经成功地在 gradle.build 文件中添加了所有内容,但是现在当我尝试编写 Fabric.with(this, new Crashlytics());
它说:
Error:(163, 31) error: cannot find symbol class Crashlytics
Error:(163, 9) error: cannot find symbol variable Fabric
Error:Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
这是我的 gradle.build 文件
....
apply plugin: 'io.fabric'
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com'
}
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
....
classpath 'io.fabric.tools:gradle:1.24.3'
}
}
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven {
url 'https://maven.google.com'
}
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 22
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "com.example.com"
....
}
}
dependencies {
......
compile('com.crashlytics.sdk.android:crashlytics:2.7.0@aar') {
transitive = true
}
}
apply plugin: 'com.google.gms.google-services'
也尝试过干净的项目/重建和等,但每次都是同样的问题
【问题讨论】:
-
请分享你的毕业作品
-
好的,更新了我的问题
-
您是否已将 io.fabric.ApiKey 添加到您的清单 @ Jemo 中?
-
是的,我添加了...
-
尝试在 Studio @ Jemo 中更新您的 Fabric 插件
标签: android crashlytics google-fabric