以下为学习Flutter遇到的问题,一集解决方案,留作笔记,用以后期学习过程中解决。
Flutter
报错信息:
A SingleTickerProviderStateMixin can only be used as a TickerProvider once.
If a State is used for multiple AnimationController objects, or if it is passed to other objects and those objects might use it more than one time in total, then instead of mixing in a SingleTickerProviderStateMixin, use a regular TickerProviderStateMixin.
解决方案: 用 TickerProviderStateMixin 替换 SingleTickerProviderStateMixin;
iOS
报错信息:
dyld: Library not loaded: @rpath/App.framework/App
Referenced from: /Users/loseboy/Library/Developer/CoreSimulator/Devices/37368366-A391-4D52-B11D-52B70E66849E/data/Containers/Bundle/Application/ED19754F-C00E-413F-B0E7-1DA7BD408DC7/Runner.app/Runner
Reason: image not found
(lldb)
解决方案:
报错信息:
Trying to embed a platform view but the PrerollContext does not support embedding
解决方案: 在 [project_name]/ios/Runner/Info.plist文件中加入以下代码
<dict>
<key>io.flutter.embedded_views_preview</key>
<true/>
</dict>
解决方案来自 https://pub.flutter-io.cn/packages/webview_flutter
github仓库 https://github.com/flutter/plugins/tree/master/packages/webview_flutter
官方所有插件仓库(推荐) https://github.com/flutter/plugins
Android
持续更新......