——-For app level——
dependencies {
implementation platform('com.google.firebase:firebase-bom:32.3.1')
implementation("com.google.firebase:firebase-crashlytics")
implementation 'com.google.firebase:firebase-analytics'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
——-For project level——
dependencies {
classpath 'com.google.gms:google-services:4.4.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};
added all possible things but still dashboard is not showing
2
Answers
Ensure that you have the necessary import latest for FirebaseCrashlytics:
the verify your main function include the proper setup for runZonedGuarded:
This usually happens with Crashlytics dashboard. happens with me too.
you should give a try by crashing your app for multiple time.
Also, please add
firebase_crashlytics: ^3.3.4 (latest)
.