gpt4 book ai didi

flutter - 目标 kernel_snapshot 失败 : Exception: Errors during snapshot creation: null build failed

转载 作者:行者123 更新时间:2023-12-04 13:00:10 27 4
gpt4 key购买 nike

我已经更新到最新的 flutter 更新。当我想启动项目时,它返回一个错误。该项目依赖于几个存储库,我不知道这是否是原因。我尝试了多种解决方案,但都没有解决错误。希望可以有人帮帮我。谢谢。

编译器消息:

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/mvvm-0.1.7/lib/view_context_helpers/logical.dart:151:25: Error: The function expression type 'Widget Function(BuildContext, Null, Widget) Function(TValue)' isn't of expected type 'Widget Function(BuildContext, TValue, Widget) Function(TValue)'.

- 'Widget' is from 'package:flutter/src/widgets/framework.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/framework.dart').
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/framework.dart').
Change the type of the function expression or the context in which it is used.
selector: (TValue value) =>
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BU�LD FAILED in 31s
Finished with error: Gradle task assembleDebug failed with exit code 1

最佳答案

我发现了这个问题 issue TL:DR这里是一个总结

看起来您的本地引擎构建 flutter/引擎和框架 + 工具 flutter/flutter 不同步:您正在使用 SemanticsFlag.isLink 之后的引擎已添加,但是在它进入框架之前是一个框架/工具。

您需要确保使用兼容的引擎和框架。在这种情况下,您需要将 flutter/flutter 更新到新版本或将 flutter/engine 回滚到旧版本。 42356

关于flutter - 目标 kernel_snapshot 失败 : Exception: Errors during snapshot creation: null build failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59369091/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com