错误(Xcode):意外的重复任务:目标“Runner”已将命令从“path/GoogleService-Info.plist”复制到“path/GoogleService-Info.plist”

Ras*_*Ali 11 xcode ios dart firebase flutter

我尝试在正确使用 firebase 进行设置后在 iOS 上运行 flutter 项目,但收到以下与 GoogleService-Info.plist 相关的重复错误。

\n

这是完整的错误输出

\n
Error output from Xcode build:\n\xe2\x86\xb3\n    objc[24052]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x215b9b620) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106b08598). One of the two will be used. Which one is undefined.\n    objc[24052]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x215b9b670) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106b085e8). One of the two will be used. Which one is undefined.\n    objc[24052]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x215b9b6c0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106b08638). One of the two will be used. Which one is undefined.\n    objc[24052]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x215b9b710) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106b08688). One of the two will be used. Which one is undefined.\n    objc[24052]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x215b9b760) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106b086d8). One of the two will be used. Which one is undefined.\n    objc[24052]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x215b9b7b0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106b08728). One of the two will be used. Which one is undefined.\n    ** BUILD FAILED **\n
Run Code Online (Sandbox Code Playgroud)\n

这是 xcode 输出

\n
 Xcode's output:\n    \xe2\x86\xb3\n        Writing result bundle at path:\n            /var/folders/8r/j5l1hdxj23n759qd_g_kkfk40000gn/T/flutter_tools.ApPpcn/flutter_ios_build_temp_diriZfLbr/temporary_xcresult_bundle\n    \n        note: Using new build system\n        note: Planning\n        note: Build preparation complete\n        note: Building targets in parallel\n        error: Unexpected duplicate tasks:\n        1) Target 'Runner' (project 'Runner') has copy command from '/Users/rashidali/Flutter_projects/lubanpoint/ios/Runner/GoogleService-Info.plist' to '/Users/rashidali/Flutter_projects/lubanpoint/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'\n        2) Target 'Runner' (project 'Runner') has copy command from '/Users/rashidali/Flutter_projects/lubanpoint/ios/Runner/GoogleService-Info.plist' to '/Users/rashidali/Flutter_projects/lubanpoint/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'\n    \n        Result bundle written to path:\n            /var/folders/8r/j5l1hdxj23n759qd_g_kkfk40000gn/T/flutter_tools.ApPpcn/flutter_ios_build_temp_diriZfLbr/temporary_xcresult_bundle\n    \n    \n    Error (Xcode): Unexpected duplicate tasks:\n    1) Target 'Runner' (project 'Runner') has copy command from '/Users/rashidali/Flutter_projects/lubanpoint/ios/Runner/GoogleService-Info.plist' to '/Users/rashidali/Flutter_projects/lubanpoint/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'\n    2) Target 'Runner' (project 'Runner') has copy command from '/Users/rashidali/Flutter_projects/lubanpoint/ios/Runner/GoogleService-Info.plist' to '/Users/rashidali/Flutter_projects/lubanpoint/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'\n    \n    Could not build the application for the simulator.\n    Error launching application on iPhone 13.\n
Run Code Online (Sandbox Code Playgroud)\n

请帮我解决这个问题

\n
Error (Xcode): Unexpected duplicate tasks:\n1) Target 'Runner' (project 'Runner') has copy command from '/Users/rashidali/Flutter_projects/lubanpoint/ios/Runner/GoogleService-Info.plist' to '/Users/rashidali/Flutter_projects/lubanpoint/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'\n2) Target 'Runner' (project 'Runner') has copy command from '/Users/rashidali/Flutter_projects/lubanpoint/ios/Runner/GoogleService-Info.plist' to '/Users/rashidali/Flutter_projects/lubanpoint/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist'\n
Run Code Online (Sandbox Code Playgroud)\n

小智 16

在 Xcode 中,在目标的“构建阶段”下,确保该GoogleService-Info.plist文件包含“复制捆绑资源”阶段中,但包含在“编译源”阶段中。我在两者中都有它,并将其从编译源中删除后,错误已解决。