1、报错原因如下:
Could not build the precompiled application for the device.
Error (Xcode): ../../.pub-cache/hosted/pub.flutter-io.cn/universal_html-2.2.2/lib/src/html/dom/element_subclasses.dart:2752:30: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
2、解决方案 在pubspec.yaml添加
universal_html: ^2.2.4
文章描述了在使用Flutter时遇到的错误,因universal_html库的版本问题(2.2.2)导致编译失败,解决方法是在pubspec.yaml中更新universal_html到2.2.4版本以解决类型不匹配的非空问题。
7833

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



