我下面面料官方文檔添加crashlytic,我已經成功添加一切都在gradle.build文件,但現在,當我試圖寫Fabric.with(this, new Crashlytics());
它說:錯誤:無法找到符號類Crashlytics和Fabric
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:[email protected]') {
transitive = true
}
}
apply plugin: 'com.google.gms.google-services'
也試過清潔工程/重建和等,但同樣的問題,每次
請您分享的gradle – Kuls
OK,更新我的問題 –
有你加入io.fabric.ApiKey你的艙單@傑莫? –