运行应用程序时出现此错误。有什么问题?我尝试更新我的豆荚。但我仍然遇到同样的错误。我有一台 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
答案 0 :(得分:3)
如果您使用的是包 get 或任何与 get 相关的包,基本上 get 最新版本与您的项目不兼容。由于我没有直接使用它,所以我去pubspec.lock并将版本更改为4.1.4而不是最新的4.3.4。
答案 1 :(得分:0)
如果您使用的是 fvm,请检查 setting.json 中的“dart.flutterSdkPath”,确保路径正确
// .vscode/settings.json
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
// Remove .fvm files from search
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
}
}
答案 2 :(得分:0)
只需打开../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/get-4.3.4/lib/get_navigation/src/root/get_material_app.dart 文件,然后删除所有名为“scrollBehavior”的参数。 我的问题就是这样解决的!