ios - Flutter 错误没有名为“scrollBehavior”的命名参数

标签 ios flutter cocoapods

我在运行应用程序时收到此错误。有什么问题?我尝试更新我的 pod 。但我仍然遇到同样的错误。我有一台 M1 Mac。

    ↳
    objc[11258]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1efc22c10) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1184b82b8). One of the two will be used. Which one is undefined.
    objc[11258]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1efc22c60) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1184b8308). One of the two will be used. Which one is undefined.
    ** BUILD FAILED **
Xcode's output:
↳
    Pods-Runner-elvtjvosznfleaabicgoahubaeqy
    ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:297:15: Error: No named parameter with the name 'scrollBehavior'.
                  scrollBehavior: scrollBehavior,
                  ^^^^^^^^^^^^^^
    ../../../development/flutter/packages/flutter/lib/src/material/app.dart:217:9: Context: Found this candidate, but the arguments don't match.
      const MaterialApp.router({
            ^^^^^^^^^^^^^^^^^^
    ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart:340:15: Error: No named parameter with the name 'scrollBehavior'.
                  scrollBehavior: scrollBehavior,
                  ^^^^^^^^^^^^^^
    ../../../development/flutter/packages/flutter/lib/src/material/app.dart:167:9: Context: Found this candidate, but the arguments don't match.
      const MaterialApp({
            ^^^^^^^^^^^
    Command PhaseScriptExecution failed with a nonzero exit code
    Pods-Runner-elvtjvosznfleaabicgoahubaeqy
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description

最佳答案

如果您正在使用 packages get 或任何与 get 相关的包,基本上 get 最新版本与您的项目不兼容。由于我没有直接使用它,所以我转到 pubspec.lock 并将版本更改为 4.1.4 而不是最新的 4.3.4。

关于ios - Flutter 错误没有名为“scrollBehavior”的命名参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68606391/

相关文章:

ios - UIScrollView 中的 UIWebView,如 Apple Mail.app

firebase - 使用 dart 和 Firestore 在单个事务中更新多个文档

ios - 链接器错误 : ld: library not found for -lPods (Trying to build . xcworkspace)

xcode - cocoa pod 去除

c++ - 从文件的特定部分(复制到文档目录中)初始化 NSInputStream?

ios - 体系结构 x86_64 的 undefined symbol : "_OBJC_CLASS_$_RCTImageLoader"

Flutter showSearch 键盘搜索

ios - 如何对 Cocoapods 安装进行 nuke 并从 Github master 开始

iphone - 如何获取正在运行的进程的 mach-o uuid?

flutter - Flutter flutter_in_app_purchases订阅FlutterInAppPurchses.instance.getSubscriptions()没有检索IAPItem的任何项目