Firebase/Crashlytics 仪表板未显示 android 的任何测试崩溃

Firebase/Crashlytics Dashboard not showing any test crashes for android

我不明白为什么它没有显示在 Firebase Crashlytics 仪表板中,当我尝试手动 link 这个包时,我收到了关于重复的错误。否则我试图改变它的依赖关系,但我在 iOS 中仍然有这个 issue.But 它工作正常并向我显示非致命错误。

在 Android 上,当我创建自定义错误以测试 Firebase Crashlytics 仪表板时,它没有向我显示任何类型的崩溃(见下图)

在这里,我将 "maven{url 'https://maven.fabric.io/public'}" 粘贴到 buildscript > 存储库中,否则我将所需的类路径 'io.fabric.tools:gradle:1.28.1' 粘贴到 buildscript > dependencies 块中

My code integration was so  android/build.gradle 
buildscript {
    repositories {
        google()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {        
        classpath("com.android.tools.build:gradle:3.4.2")
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'io.fabric.tools:gradle:1.28.1'
    }
}            
allprojects {
    repositories {
        google()
    }
}

我在这里粘贴应用插件:'io.fabric' 和实现 'com.crashlytics.sdk.android:crashlytics:2.10.1'

android/app/build.gradle
apply plugin: "com.android.application"
apply plugin: "io.fabric"

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.facebook.react:react-native:+"
    implementation 'com.google.firebase:firebase-analytics:17.2.1'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
}
apply plugin: 'com.google.gms.google-services' 

进入package.json我已经安装了最新版本的包

package.json

{
    "dependencies": {
        "@react-native-firebase/app": "^6.2.0",
        "@react-native-firebase/crashlytics": "^6.2.0"
    }
}

NOTE : I don't link manually (as i understood i don't need to do it because it is doing automatically "react-native auto-linking")

Here is my 'index.js' file

import React, { Component } from 'react';
import crashlytics from '@react-native-firebase/crashlytics';

class App extends Component {
    componentDidMount(){
        // Here is my custom errors
        // But it's now showing in dashboard
        // But in iOS it works good
        crashlytics().recordError(new Error('For test'));
        crashlytics().log('For test');
    }
    render () {
       return (
           <View>
              <Text>Test</Text>
           </View>
       )
    }
}

export default App;

我认为你是 运行 处于开发模式的分析。

在 Android 中,craslytics 仅在生产模式下发送。