I want to track my flutter Android/IOS crashes in firebase crashlytics , but there is a problem with tracking the first crash on the app and it's still listening to the first crash.
in pubspec.yaml
firebase_crashlytics:
firebase_analytics:
firebase_core: ^1.7.0
in app build.gradle
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'io.fabric'
in build.gradle
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.google.gms:google-services:4.3.0'
classpath 'io.fabric.tools:gradle:1.26.1'
classpath 'com.android.tools.build:gradle:4.1.0'
}
}
and in the flutter main.dart :
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
await FirebaseCrashlytics.instance
.setCrashlyticsCollectionEnabled(true);
FirebaseCrashlytics.instance.setUserIdentifier("51");
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
FirebaseCrashlytics.instance.crash();
I even tried android native example crash throw new RuntimeExeption("test Firebase crash");
but firebase is still listening for the first app crash.
UPDATE
Firebase Crashlytics page is just like bellow after 48 hours
