[英]Flutter app stuck on Splash screen on device
I am trying to run a flutter app on iOS devices after creating a release build.创建发布版本后,我正在尝试在 iOS 设备上运行颤振应用程序。 Every time I run the app it gets stuck on the splash screen.
每次我运行应用程序时,它都会卡在启动画面上。 This only happens on a real device and the app runs fine with the simulator.
这只发生在真实设备上,应用程序在模拟器上运行良好。 I have already tried adding
我已经尝试添加
WidgetsFlutterBinding.ensureInitialized();
in main.dart file as I was getting Unhandled Exception: NoSuchMethodError: The getter 'defaultBinaryMessenger' was called on null.
在 main.dart 文件中,因为我得到
Unhandled Exception: NoSuchMethodError: The getter 'defaultBinaryMessenger' was called on null.
but it didn't help.但这没有帮助。 Also tried everything described here Flutter app opens, but is stuck on splash-screen
还尝试了此处描述的所有内容Flutter 应用程序打开,但卡在闪屏上
Would love to know if anyone has any ideas?想知道是否有人有任何想法?
One thing to check as well - make sure the deployment targets/ios versions are the same.还要检查一件事 - 确保部署目标/ios 版本相同。 Check under podfile (if uncommented at top) and AppFrameWorkInfo (at the bottom - minimumOSVersion), as well as Project -> Runner -> Info -> Deployment Target
检查 podfile(如果在顶部未注释)和 AppFrameWorkInfo(在底部 - minimumOSVersion),以及 Project -> Runner -> Info -> Deployment Target
If the app runs fine in an iOS simulator, try running flutter clean
to rebuild the auto-generated iOS project in the Flutter project.如果应用在 iOS 模拟器中运行良好,请尝试运行
flutter clean
在 Flutter 项目中重建自动生成的 iOS 项目。 You can also verify if running the release build on iOS simulator works without issues.您还可以验证在 iOS 模拟器上运行发布版本是否正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.