You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
======== Exception caught by Flutter framework =====================================================
The following assertion was thrown during runApp:
Zone mismatch.
The Flutter bindings were initialized in a different zone than is now being used. This will likely cause confusion and bugs as any zone-specific configuration will inconsistently use the configuration of the original binding initialization zone or this zone based on hard-to-predict factors such as which zone was active when a particular callback was set.
It is important to use the same zone when calling ensureInitialized on the binding as when calling runApp later.
To make this warning fatal, set BindingBase.debugZoneErrorsAreFatal to true before the bindings are initialized (i.e. as the first statement in void main() { }).
When the exception was thrown, this was the stack:
BindingBase.debugCheckZone. (package:flutter/src/foundation/binding.dart:503:29)
BindingBase.debugCheckZone (package:flutter/src/foundation/binding.dart:508:6)
runApp (package:flutter/src/widgets/binding.dart:1093:18)
main. (package:flutter_bugly_example/main.dart:7:43)
FlutterBugly.postCatchedException. (package:flutter_bugly/src/flutter_bugly.dart:101:15)
FlutterBugly.postCatchedException (package:flutter_bugly/src/flutter_bugly.dart:100:5)
main (package:flutter_bugly_example/main.dart:7:16)
_runMain. (dart:ui/hooks.dart:159:23)
_delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:296:19)
_RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 4 frames from dart:async)
The text was updated successfully, but these errors were encountered:
runapp 前面加上 WidgetsFlutterBinding.ensureInitialized(); 在flutter 3.10 及更高版本会报出异常
void main() {
WidgetsFlutterBinding.ensureInitialized();
FlutterBugly.postCatchedException(() => runApp(MyApp()));
}
======== Exception caught by Flutter framework =====================================================
The following assertion was thrown during runApp:
Zone mismatch.
The Flutter bindings were initialized in a different zone than is now being used. This will likely cause confusion and bugs as any zone-specific configuration will inconsistently use the configuration of the original binding initialization zone or this zone based on hard-to-predict factors such as which zone was active when a particular callback was set.
It is important to use the same zone when calling
ensureInitialized
on the binding as when callingrunApp
later.To make this warning fatal, set BindingBase.debugZoneErrorsAreFatal to true before the bindings are initialized (i.e. as the first statement in
void main() { }
).When the exception was thrown, this was the stack:
BindingBase.debugCheckZone. (package:flutter/src/foundation/binding.dart:503:29)
BindingBase.debugCheckZone (package:flutter/src/foundation/binding.dart:508:6)
runApp (package:flutter/src/widgets/binding.dart:1093:18)
main. (package:flutter_bugly_example/main.dart:7:43)
FlutterBugly.postCatchedException. (package:flutter_bugly/src/flutter_bugly.dart:101:15)
FlutterBugly.postCatchedException (package:flutter_bugly/src/flutter_bugly.dart:100:5)
main (package:flutter_bugly_example/main.dart:7:16)
_runMain. (dart:ui/hooks.dart:159:23)
_delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:296:19)
_RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)
(elided 4 frames from dart:async)
The text was updated successfully, but these errors were encountered: