添加截图包后我的 flutter app 没有运行

问题描述 投票:0回答:0

在我的 flutter 应用程序上添加截图包后,我的应用程序无法构建,它给了我这个错误:

: Error: Undefined name 'View'.
screenshot.dart:154
        context == null ? fallBackView : View.maybeOf(context) ?? fallBackView;
                                         ^^^^
: Error: No named parameter with the name 'view'.
screenshot.dart:164
      view: view,
      ^^^^
/C:/src/FlutterSDK/flutter/packages/flutter/lib/src/rendering/view.dart:68:3: Context: Found this candidate, but the arguments don't match.
  RenderView({
  ^^^^^^^^^^

Target kernel_snapshot failed: Exception
2

FAILURE: Build failed with an exception.

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

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\FlutterSDK\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 6s
Exception: Gradle task assembleDebug failed with exit code 1

任何建议都会有帮助。提前谢谢你。

android flutter flutter-dependencies screenshot
© www.soinside.com 2019 - 2024. All rights reserved.