英文:
Unable to build Flutter project after upgrade SDK to 3.10.1
问题
我在将Flutter升级到最新版本3.10.1后,在调试模式下运行时遇到以下错误:
file_version_info.dart:16:17: 错误:字段'wCodePage'不能为可空或具有类型'Null',它必须是int
、double
、Pointer
或Struct
或Union
的子类型。
external int? wCodePage;
^
目标kernel_snapshot失败:异常
失败:构建失败,出现异常。
- 位置:
脚本'C:\flutter\packages\flutter_tools\gradle\flutter.gradle'行:1201
我尝试过清除构建并升级包,但都没有帮助。当我将SDK降级回3.7.2时,它可以正常工作。感谢任何帮助。
英文:
I'm getting the following error when running debug mode after upgrading Flutter to the latest 3.10.1.
file_version_info.dart:16:17: Error: Field 'wCodePage' cannot be nullable or have type 'Null', it must be `int`, `double`, `Pointer`, or a subtype of `Struct` or `Union`.
external int? wCodePage;
^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1201
I have tried to clean the build and upgrade packages but nothing helps. It works when I down grade SDK back to 3.7.2. Appreciate any helps.
答案1
得分: 0
我找到了我的问题。我在使用一个名为 new_version
的包,它使用了已弃用的包 package_info_plus_windows
。在我移除了有问题的包之后,一切都正常了。我认为这是Flutter的一个问题,因为有这么多第三方包,可能会导致与Flutter版本升级不兼容的问题。
英文:
I found my issue. I was using a package named new_version
which uses depreciated package package_info_plus_windows
. Everything worked after I removed the trouble package. I think that this is an issue with Flutter with so many third-party packages that they may cause incompatibility issues as Flutter version advances.
答案2
得分: 0
我找到了我的问题。我正在使用一个名为new_version的包,它使用了已弃用的包package_info_plus_windows。在我移除了有问题的包后,一切都正常工作了。我认为这是Flutter的一个问题,因为有这么多第三方包可能会导致与Flutter版本的兼容性问题。
英文:
I found my issue. I was using a package named new_version which uses depreciated package package_info_plus_windows. Everything worked after I removed the trouble package. I think that this is an issue with Flutter with so many third-party packages that they may cause incompatibility issues as Flutter version advances.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论