更新:不再需要这个问题,因为它超出了SOW的范围。我投票决定关闭它。请注意,我接受了一些研究来找出答案。崩溃中的一些问题在这个问题发布几周后就得到了解决。我和一个来自Crashlytics的人聊天,他回答说我使用的版本有问题。
在3个月的时间里,当我报告这个问题时,我已经有了30天前在另一个应用程序中报告的最新崩溃。我再次使原力崩溃(在以前的应用程序中,它工作的地方)。在Crashlytics仪表板中没有报告这些强制崩溃,而新的应用程序也没有注册。
以下代码没有问题,因为几周后一切又恢复正常。
我在我的Android工作室Gradle 3.1.3版中使用了Fabric插件。
更多详细信息:
Crashlytics插件:
buildscript {
repositories {
google()
jcenter()
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
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
附属国:
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
transitive = true;
}
和
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
应用程序版本:
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.mypackage"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
在我的应用程序[派生和清单已注册]类的onCreate方法中:
final Fabric fabric = new Fabric.Builder(this)
.kits(new Crashlytics())
.debuggable(true)
.build();
Fabric.with(fabric);
如果有人面对这个问题,他或她可以从这篇文章的答案中找到很大的帮助。