flutter遇到这个问题的解决方法:
1.切换到stable最新分支
2.在runApp之前,最好是在man函数第一行加上:
WidgetsFlutterBinding.ensureInitialized();
We would need additional information to re-open this. How does the error reproduce? Can somebody post a minimal code example that shows the error?
Also, did you update your app as explained in https://groups.google.com/forum/#!topic/flutter-announce/sHAL2fBtJ1Y: If you use message channels before calling runApp you need to initialize the bindings manually by calling WidgetsFlutterBinding.ensureInitialized().
本文提供了解决Flutter中常见错误的方法,包括切换到stable最新分支和在runApp前手动初始化WidgetsFlutterBinding,确保消息通道正常工作。
2858

被折叠的 条评论
为什么被折叠?



