after updating Android Studio and flutter (and kotlin) i get this warnings/errors
how to solve or can i ignore without consequential error?
Thank you in anvance.
W/FlutterJNI(23046): FlutterJNI.loadLibrary called more than once
W/FlutterJNI(23046): FlutterJNI.prefetchDefaultFontManager called more than once
W/FlutterJNI(23046): FlutterJNI.init called more than once
Edit 23.03.2022:
it's because "await Firebase.initializeApp();" is called twice like in the documentation mentioned. i have to research more. maybe solution with firebase_options.dart.
Edit 16.04.2022:
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform,);
}
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform,);
// Set the background messaging handler early on, as a named top-level function
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
//String? token =
await FirebaseMessaging.instance.getAPNSToken();
await FirebaseMessaging.instance.getToken();
//print('APNS token: $token');
}