首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在最新的Flutter升级之后-项目不在构建中

在最新的Flutter升级之后-项目不在构建中
EN

Stack Overflow用户
提问于 2020-04-07 16:04:17
回答 1查看 1.3K关注 0票数 2

在构建时的所有项目中-面对这个错误。在flutter升级之后,我遇到了这个错误。我尝试了所有的升级和无效缓存,但是当我运行这个项目时,发现了这个异常。

代码语言:javascript
运行
复制
[+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
EN

回答 1

Stack Overflow用户

发布于 2021-10-25 08:16:14

您需要检查构造函数上设置的参数的名称,如错误:Found this candidate, but the arguments don't match. CupertinoFullscreenDialogTransition中所述

错误指向此参数:Error: No named parameter with the name 'animation'.

检查CupertinoFullscreenDialogTransition的docs时,构造函数需要primaryRouteAnimationsecondaryRouteAnimation

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61075440

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档