我用的是 Mac M1。我一直在为我的 flutter 应用程序创建风格(涉及 xcode 中的一些工作)。现在,当我尝试运行 ios 时,我得到:
AMSupportURLConnectionDelegate 类在两者中均实现
/usr/lib/libamsupport.dylib (0x220357678) 和
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x1066202c8)。将使用两者之一。哪一个未定义。
错误(Xcode):多个命令产生
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app':
- 目标“Runner”具有带输出的链接命令
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
- 目标“Runner”具有带输出的创建目录命令
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
构建设备时遇到错误。
我一直在尝试各种方法来修复这个小错误,并且可能会破坏我的应用程序。
以下是一堆似乎相关的设置:









完整错误:
benjaminfarquhar@MacBook-Pro vepo_front_end % flutter 构建 ios
--debug 为设备 (ios) 构建 com.benjaminfarquhar.vepo... 使用指定的设备部署自动签名 iOS
Xcode 项目中的开发团队:5256E329AM 正在运行 pod install...
2,579ms 运行 Xcode 构建...
Xcode 构建完成。 3.2秒
无法构建 iOS 应用程序 Xcode 构建错误输出:↳
objc[34678]:AMSupportURLConnectionDelegate 类在 /usr/lib/libamsupport.dylib (0x220357678) 和
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x1066202c8)。之一
两者都会被使用。哪一个是未定义的。
objc[34678]:AMSupportURLSession 类在 /usr/lib/libamsupport.dylib (0x2203576c8) 和
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x106620318)。之一
两者都会被使用。哪一个是未定义的。
2022-03-12 10:20:29.519 xcodebuild[34678:4448705] 警告:“Pods-Runner.debug.xcconfig”的文件引用是
多个组的成员(“Pods-Runner”和“Pods-Runner”);这表明项目格式不正确。仅限会员
其中一组的成员资格将被保留(但目标中的成员资格将不受影响)。如果您想要参考
同一文件位于多个组中,请添加对同一路径的另一个引用。
** 构建失败 **
Xcode 的输出:↳
在路径中写入结果包:
/var/folders/37/zgg8z2yj5sq03glqv_2sygn80000gn/T/flutter_tools.0ZIxKq/flutter_ios_build_temp_diryRJHxB/temporary_xcres
ult_bundle
注意:使用新的构建系统
注:规划
注意:构建准备完成
注意:按依赖顺序构建目标
错误:多个命令生成“/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app”:
1) 目标“Runner”具有带输出的链接命令
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
2)目标“Runner”具有带输出的创建目录命令
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
警告:iOS 部署目标
“IPHONEOS_DEPLOYMENT_TARGET”设置为 8.0,但支持的部署目标版本范围为 9.0 到 15.2.99。
(在项目“Pods”的目标“TOCropViewController”中)
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
警告:iOS 部署目标
“IPHONEOS_DEPLOYMENT_TARGET”设置为 8.0,但支持的部署目标版本范围为 9.0 到 15.2.99。
(在项目“Pods”的目标“TOCropViewController-TOCropViewControllerBundle”中)
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
警告:iOS 部署目标
“IPHONEOS_DEPLOYMENT_TARGET”设置为 8.0,但支持的部署目标版本范围为 9.0 到 15.2.99。
(在项目“Pods”的目标“FMDB”中)
警告:重复的输出文件“/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app”
执行任务:
MkDir /Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app
(在项目的目标“Runner”中
“跑步者”)
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
警告:iOS 部署目标
“IPHONEOS_DEPLOYMENT_TARGET”设置为 8.0,但支持的部署目标版本范围为 9.0 到 15.2.99。
(在项目“Pods”的目标“ReachabilitySwift”中)
结果包写入路径:
/var/folders/37/zgg8z2yj5sq03glqv_2sygn80000gn/T/flutter_tools.0ZIxKq/flutter_ios_build_temp_diryRJHxB/temporary_xcres
ult_bundle
错误(Xcode):多个命令产生
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app':
- 目标“Runner”具有带输出的链接命令
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
- 目标“Runner”具有带输出的创建目录命令
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
构建设备时遇到错误。
更新: 这些答案确实不工作。我认为他们也不为OP工作,因为他们没有将答案标记为解决方案。
我想我可能需要 Flutter 文件夹内的 Debug.xcconfig 和 Release.xcconfig,但是当我在 xcode 中选择它们时,它们不会显示任何内容:

I'm on Mac M1. I've been creating flavors for my flutter app (involved some work in xcode). Now when I try to run ios I get:
Class AMSupportURLConnectionDelegate is implemented in both
/usr/lib/libamsupport.dylib (0x220357678) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x1066202c8). One of the two will be used. Which one is undefined.
Error (Xcode): Multiple commands produce
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app':
- Target 'Runner' has link command with output
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
- Target 'Runner' has create directory command with output
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
Encountered error while building for device.
I've been trying all sorts of things to fix this little error and probably breaking my app.
Here is a bunch of settings that seem relevant:










Full error:
benjaminfarquhar@MacBook-Pro vepo_front_end % flutter build ios
--debug Building com.benjaminfarquhar.vepo for device (ios)... Automatically signing iOS for device deployment using specified
development team in Xcode project: 5256E329AM Running pod install...
2,579ms Running Xcode build...
Xcode build done. 3.2s
Failed to build iOS app Error output from Xcode build: ↳
objc[34678]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x220357678) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x1066202c8). One of
the two will be used. Which one is undefined.
objc[34678]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x2203576c8) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x106620318). One of
the two will be used. Which one is undefined.
2022-03-12 10:20:29.519 xcodebuild[34678:4448705] warning: The file reference for "Pods-Runner.debug.xcconfig" is a
member of multiple groups ("Pods-Runner" and "Pods-Runner"); this indicates a malformed project. Only the membership
in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the
same file in more than one group, please add another reference to the same path.
** BUILD FAILED **
Xcode's output: ↳
Writing result bundle at path:
/var/folders/37/zgg8z2yj5sq03glqv_2sygn80000gn/T/flutter_tools.0ZIxKq/flutter_ios_build_temp_diryRJHxB/temporary_xcres
ult_bundle
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
error: Multiple commands produce '/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app':
1) Target 'Runner' has link command with output
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
2) Target 'Runner' has create directory command with output
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99.
(in target 'TOCropViewController' from project 'Pods')
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99.
(in target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99.
(in target 'FMDB' from project 'Pods')
warning: duplicate output file '/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
on task:
MkDir /Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app
(in target 'Runner' from project
'Runner')
/Users/benjaminfarquhar/dev/vepo_front_end/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99.
(in target 'ReachabilitySwift' from project 'Pods')
Result bundle written to path:
/var/folders/37/zgg8z2yj5sq03glqv_2sygn80000gn/T/flutter_tools.0ZIxKq/flutter_ios_build_temp_diryRJHxB/temporary_xcres
ult_bundle
Error (Xcode): Multiple commands produce
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app':
- Target 'Runner' has link command with output
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
- Target 'Runner' has create directory command with output
'/Users/benjaminfarquhar/dev/vepo_front_end/build/ios/debug-iphoneos/.app'
Encountered error while building for device.
UPDATE: These answers do not work. I don't think they worked for the OP either since they didn't mark an answer as the solution.
I think I might need Debug.xcconfig and Release.xcconfig inside the Flutter folder but when I select them in xcode they don't display any contents:

发布评论
评论(1)
在带有项目路径的终端上运行
arch -x86_64 pod install
命令run
arch -x86_64 pod install
command on the terminal with project path