在上次升级 flutter 之前,我的应用程序运行良好,但我不明白为什么升级 Flutter 后出现这些错误,请帮助我如何处理讨论问题..
无效的 depfile: C:\Users\yagiz\AndroidStudioProjects\lezzet_kitabi.dart_tool\flutter_build\3d9c3474602422658f145de48f68dac2\kernel_snapshot.d 无效的 depfile:C:\Users\yagiz\AndroidStudioProjects\lezzet_kitabi.dart_tool\flutter_build\3d9c3474602422658f145de48f68dac2\kernel_snapshot.d /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7:错误:结构“ENUMLOGFONTEX”为空。空结构是未定义的行为。 类 ENUMLOGFONTEX 扩展结构 { ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7:错误:结构“BLUETOOTH_PIN_INFO”为空。空结构是未定义的行为。 类 BLUETOOTH_PIN_INFO 扩展结构 { ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7:错误:结构“EXCEPINFO”为空。空结构是未定义的行为。 class EXCEPINFO 扩展 Struct {} ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7:错误:结构“PROPERTYKEY”为空。空结构是未定义的行为。 class PROPERTYKEY 扩展 Struct {} ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7:错误:结构“PROPVARIANT”为空。空结构是未定义的行为。 类 PROPVARIANT 扩展 Struct {} ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7:错误:结构“SAFEARRAY”为空。空结构是未定义的行为。 class SAFEARRAY 扩展 Struct {} ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7:错误:结构“CLSID”为空。空结构是未定义的行为。 类 CLSID 扩展了 Struct {} ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7:错误:结构“STATSTG”为空。空结构是未定义的行为。 类 STATSTG 扩展结构 {} ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7: 错误:结构 'NLM_SIMULATED_PROFILE_INFO' 为空。空结构是未定义的行为。 类 NLM_SIMULATED_PROFILE_INFO 扩展结构 {} ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: 错误:结构 'Utf8' 为空。空结构是未定义的行为。 类 Utf8 扩展结构 { ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: 错误:结构 'Utf16' 为空。空结构是未定义的行为。 类 Utf16 扩展结构 { ^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: 错误:预期类型“T”是有效的和“NativeType”的实例化子类型。 final int totalSize = count * sizeOf(); ^
FAILURE:构建失败,出现异常。
哪里: 脚本 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' 行:991
出了什么问题: 任务 ':app:compileFlutterBuildDebug' 执行失败。
Process 'command 'C:\src\flutter\bin\flutter.bat'' 以非零退出值 1 结束
试试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。
构建在 12 秒内失败 例外:Gradle 任务 assembleDebug 失败,退出代码为 1
答案 0 :(得分:0)
删除了 dependencies
中的包 pubspec.yaml
,运行 flutter packages get
之后再次将包添加到 dependencies
并运行 flutter packages get
这对我有用>
答案 1 :(得分:0)
我在开发频道上遇到了同样的问题。我没有降级就解决了这个问题。只需添加此依赖项:
ffi: ^1.0.0