颤振中没有名称错误的命名参数

时间:2021-01-21 21:23:16

标签: android flutter debugging flutter-layout flutter-test

当我在 android studio 上运行我的 flutter 应用程序时出现这个错误,我做了 flutter clean 和许多命令,但没有用。

Running Gradle task 'assembleDebug'...
/E:/setupfolder/programs/AndroidSDK/flutter/.pub-cache/hosted/pub.dartlang.org/pull_to_refresh-1.6.4/lib/src/smart_refresher.dart:434:9: Error: No named parameter with the name 'keyboardDismissBehavior'.
        keyboardDismissBehavior:
        ^^^^^^^^^^^^^^^^^^^^^^^
/E:/setupfolder/programs/AndroidSDK/flutter/packages/flutter/lib/src/widgets/scroll_view.dart:588:9: Context: Found this candidate, but the arguments don't match.
  const CustomScrollView({
        ^^^^^^^^^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'E:\setupfolder\programs\AndroidSDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:\setupfolder\programs\AndroidSDK\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.

2 个答案:

答案 0 :(得分:1)

将 pubspec.yaml 中的 pull_to_refresh 版本更新为 ^1.6.4

答案 1 :(得分:0)

将 pull_to_refresh 降级到 1.6.3 版 与最新版本的flutter不兼容 https://github.com/peng8350/flutter_pulltorefresh/issues/424