【发布时间】:2020-07-19 08:59:12
【问题描述】:
在构建时的所有项目中 - 面临此错误。颤振升级后,我遇到了这个错误。我已经尝试了所有升级和无效缓存以及所有 - 但是当我运行项目时发现了这个异常。
[+37924 ms]
Compiler message:
[ +6 ms] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/extended_image-0.7.2/lib/src/gesture/extended_image_slide_page_route.dart:333:9: Error: No named parameter with the name 'animation'.
[ +1 ms] animation: animation,
[ +1 ms] ^^^^^^^^^
[ ] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
[ ] CupertinoFullscreenDialogTransition({
[ +1 ms] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[+96166 ms] Compiler message:
[ ] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/flutter/.pub-cache/hosted/pub.dartlang.org/extended_image-0.7.2/lib/src/gesture/extended_image_slide_page_route.dart:333:9: Error: No named parameter with the name 'animation'.
[ ] animation: animation,
[ ] ^^^^^^^^^
[ ] /D:/FlutterSDK/flutter_windows_v1.5.4-hotfix.2-stable/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
[ ] CupertinoFullscreenDialogTransition({
[ ] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[+13876 ms] Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
[ +1 ms] build failed.
[ +618 ms] FAILURE: Build failed with an exception.
[ +14 ms] * Where:
[ ] Script 'D:\FlutterSDK\flutter_windows_v1.5.4-hotfix.2-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 883
[ ] * What went wrong:
[ ] Execution failed for task ':app:compileFlutterBuildDebug'.
[ ] > Process 'command 'D:\FlutterSDK\flutter_windows_v1.5.4-hotfix.2-stable\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
[ ] BUILD FAILED in 2m 28s
【问题讨论】:
-
animation参数被github.com/flutter/flutter/pull/50180 拆分和重命名。因为显然没有使用CupertinoFullscreenDialogTransition的现有测试,所以该更改不会破坏任何测试,也不被视为破坏性更改。 -
@jamesdlin,好的,我期待相同的 - 但是如何在我不知道的拉取请求中找到此类信息。如何解决这个问题的一个问题?我应该怎么做?
-
从
Error: No named parameter with the name 'animation'.错误消息中,很明显CupertinoFullscreenDialogTransition构造函数参数发生了变化。从那里我搜索了fluttergit 存储库以查找实现CupertinoFullscreenDialogTransition的位置,运行git blame以查看哪些提交修改了参数,并查看了其提交描述以找到引用的拉取请求。 -
你能告诉我们你在项目的 pubspec.yaml 文件中使用了哪些包/插件
-
我遇到了同样的问题,这修复了我的项目:See
标签: flutter dart flutter-animation dart-sdk