如何修复此错误:结构“Utf8”为空。不推荐使用对空结构的支持...使用 Opaque 代替

2024-03-25

我最近在运行我的应用程序时开始收到此错误。它似乎并没有影响一切,但它在日志中非常嘈杂和烦人。我没有更改任何内容或向我的应用程序添加任何内容,这会导致类似的情况,我最近做的唯一一件事就是升级到 Flutter 的最新版本(我经常升级,所以距离我上次更新只有几天) 。

../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:1111:7: Info: Struct 'ENUMLOGFONTEX' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class ENUMLOGFONTEX extends Struct {
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2835:7: Info: Struct 'BLUETOOTH_PIN_INFO' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class BLUETOOTH_PIN_INFO extends Struct {
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2960:7: Info: Struct 'EXCEPINFO' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class EXCEPINFO extends Struct {}
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2966:7: Info: Struct 'PROPERTYKEY' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class PROPERTYKEY extends Struct {}
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2973:7: Info: Struct 'PROPVARIANT' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class PROPVARIANT extends Struct {}
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2978:7: Info: Struct 'SAFEARRAY' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class SAFEARRAY extends Struct {}
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2985:7: Info: Struct 'CLSID' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class CLSID extends Struct {}
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2992:7: Info: Struct 'STATSTG' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class STATSTG extends Struct {}
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4/lib/src/structs.dart:2999:7: Info: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class NLM_SIMULATED_PROFILE_INFO extends Struct {}
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Info: Struct 'Utf8' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class Utf8 extends Struct {
      ^
../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Info: Struct 'Utf16' is empty. Support for empty structs is deprecated and will be removed in the next stable version of Dart. Use Opaque instead.
class Utf16 extends Struct {
      ^

列表中的最后一个错误看起来略有不同:

../../../../../flutter/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Info: Support for using non-constant type arguments 'T' in this FFI API is deprecated and will be removed in the next stable version of Dart. Rewrite the code to ensure that type arguments are compile time constants referring to a valid native type.
  final int totalSize = count * sizeOf<T>();
                                ^

知道我该如何解决这个问题吗?我试过flutter clean但这并没有解决问题。

这是我的flutter doctor output:

Flutter 1.26.0-13.0.pre.190 • channel master • https://github.com/flutter/flutter.git
Framework • revision 7db172b24d (50 minutes ago) • 2021-01-26 17:18:40 -0800
Engine • revision b11bef83a5
Tools • Dart 2.12.0 (build 2.12.0-263.0.dev)

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.26.0-13.0.pre.190, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Community Edition (version 2020.3.1)
[✓] VS Code (version 1.52.1)
[✓] Connected device (2 available)

• No issues found!

显然这个flutter SDK版本有错误,之前的版本运行良好,您可以在flutter控制台中使用以下命令解决此问题:

flutter downgrade
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何修复此错误:结构“Utf8”为空。不推荐使用对空结构的支持...使用 Opaque 代替 的相关文章

随机推荐

  • Android:快速按下按钮会导致多个意图实例

    目前 我遇到一个错误 如果用户快速点击按钮 该按钮所附加的意图将多次触发 从而导致需要再次回溯的该意图堆栈 我怎样才能避免这种情况或补救这种情况 谢谢 k 这是 onClickListener 的内部 我在这里设置了布尔值 然后在过程结束时
  • 使用 Spreadsheetml 换行文本的样式

    我使用 xslt 生成电子表格 并想要一个带有换行文本的单元格 或者更好 带有换行符的文本 所以我的 xslt 为工作表数据生成以下 XML
  • 在 osx 上批量将 .py(文本文件)转换为 .pdf

    我教授 Python 课程 并且有大量提交用于考试的 py 文件 我想将所有这些内容转换为 pdf 以便我可以在 ipad 上的 IAnnotate 中打开它们 对其进行标记并将其返回给学生 我怎样才能在批处理模式下进行这样的转换 在小牛队
  • 在以破折号开头的目录中查找

    find将文件名开头的破折号解释为选项的开头 使用熟悉的 技巧不起作用 因为选项位于文件名之后 引用无效 并将第一个破折号替换为 也不行 通常鼓励用户在此类文件名之前添加 但是如果我不知道给定的路径是绝对路径还是相对路径 我该怎么办 编辑
  • rdstate 和 rdbuf 中的 rd 代表什么?

    C 标准I O库中有两个名称 rdstate and rdbuf 我知道 state 和 buf 但是 rd 是什么 PS 我相信我知道如何使用rdstate and rdbuf 不要教我那个 我认为它们代表 read 类似于大多数人使用
  • 如何使用 dbus-send 调用 org.bluez.Adapter1.StartDiscovery?

    我正在尝试使用 Bluez 5 44 进行交互dbus send https dbus freedesktop org doc dbus send 1 html命令行工具 我似乎无法让它正确启动发现 尽管当我使用时它工作得很好bluetoo
  • 使用 POI Apache 从 Excel 读取数据时将数据添加到 ArrayList

    我正在尝试使用 POI Apache 从 Excel 工作表中读取数据 我遇到的问题是我想同时读取一行中所有单元格的数据并将其存储在 Type Class 的 ArrayList 中 但输出只是逐个单元格 这是打开 Excel 工作表并逐个
  • 从 Windows 媒体库获取目录列表

    有没有什么方法可以以编程方式查找当前在 Windows 媒体库上设置的目录列表 例如 假设我有以下库 我为葡萄牙语表示歉意 但你会明白的 我怎样才能以编程方式获得这些三个目录路径列于视频库 D Filmes D Series D Video
  • 如何使用 Scala 中的任何库将通用潜在嵌套映射 Map[String, Any] 转换为案例类?

    我对反射并没有太多的兴趣 这个答案在某些情况下使用无形的作品 但似乎有很多边缘情况 将 Map String Any 转换为 case 类的无形状代码无法处理可选子结构 https stackoverflow com questions 5
  • 检测全屏模式

    现代桌面版 IE 10 始终是全屏的 有一个居住规范 https dvcs w3 org hg fullscreen raw file tip Overview html for fullscreenW3 上的伪类 但是当我尝试使用 jQu
  • pandas 中日期时间索引的算术运算

    在 pandas 中 您可以通过基于经典整数位置 行的索引或基于日期时间的索引来访问时间序列的特定位置 可以使用基本算术运算来操作基于整数的索引 例如如果我有一个integer index对于频率为 12 小时的时间序列 并且我想恰好在此之
  • 为什么要在 Java 中的方法参数上使用关键字“final”?

    我不明白在哪里final关键字是really当它用在方法参数上时很方便 如果我们排除匿名类的使用 可读性和意图声明 那么它对我来说几乎毫无价值 强制某些数据保持不变并不像看起来那么有力 如果参数是原语 那么它将没有任何效果 因为参数作为值传
  • 如何优化 FQL 以避免 Facebook 超时?

    我们来举个简单的FQL查询以获取自昨天以来用户的朋友共享的所有链接 例如 SELECT link id title url owner created time FROM link WHERE created time gt strtoti
  • 从复选框输入 PHP 表单将多个项目插入到一个 ID MySQL

    I badly needed this solution Here is the image what I will checked 这是订单 ID 它对于所有问题标题都是通用的 它将像这样插入 这是我使用的代码 if isset POST
  • Google API 发送带有附件的电子邮件 - REST API 调用 Postman

    我想通过 Google API 创建电子邮件 消息 用户消息发送 https developers google com gmail api reference rest v1 users messages send 我设法使用此端点创建了
  • 处理数据库模式中的更改

    我正处于构建应用程序的初始阶段 该应用程序有望以 1000 的价格出售 更有可能的是数百 但无论哪种方式都足以引起数据库架构更改的严重头痛 我相当受限于 windows net sql 服务器环境 因为我们的许多客户将自行托管我在他们的网络
  • Java RMI 资源

    我目前正在进行一个涉及广泛使用 Java RMI 的项目 我想知道是否有人知道有关它的任何好的资源 我目前找到的材料所遇到的问题是它通常已经过时 如 Java 1 3 和 或半完整 我什至很乐意买一本关于它的书 但在亚马逊上看 所有的书都已
  • 通过 apache modwsgi 运行时如何制作 Bottle 打印堆栈跟踪?

    当 Bottle 作为独立服务器运行时 这很容易做到 from bottle import run Bottle run app app host config get bottle host localhost port config g
  • FILAB VM 与 Cosmos 全局实例之间的连接问题

    我遇到了问题中讨论的相同类型的连接问题 Cygnus 无法在 Cosmos 全局实例上保留数据 https stackoverflow com questions 33674713 cygnus can not persist data o
  • 如何修复此错误:结构“Utf8”为空。不推荐使用对空结构的支持...使用 Opaque 代替

    我最近在运行我的应用程序时开始收到此错误 它似乎并没有影响一切 但它在日志中非常嘈杂和烦人 我没有更改任何内容或向我的应用程序添加任何内容 这会导致类似的情况 我最近做的唯一一件事就是升级到 Flutter 的最新版本 我经常升级 所以距离