Xcode构建完成。无法构建iOS应用程序 - Flutter项目。

7

我在将Flutter升级到最新稳定版本后遇到了以下错误。已执行所有可能的命令以清除缓存和安装Pods。

Xcode build done.                                           12.1s
Failed to build iOS app
Error output from Xcode build:
↳
    objc[3394]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1f5995eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1063384f8). One of the two will be used. Which one is undefined.
    objc[3394]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1f5995f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106338548). One of the two will be used. Which one is undefined.
    objc[3394]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1f5995f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106338598). One of the two will be used. Which one is undefined.
    objc[3394]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1f5995fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1063385e8). One of the two will be used. Which one is undefined.
    objc[3394]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1f5995ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106338638). One of the two will be used. Which one is undefined.
    objc[3394]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1f5996040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106338688). One of the two will be used. Which one is undefined.
    2022-03-20 16:20:58.949 xcodebuild[3394:27451] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    2022-03-20 16:20:58.949 xcodebuild[3394:27451] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/p3/k59gspbd78s4bpfvpwpz4ct80000gn/T/flutter_tools.a1tf9R/flutter_ios_build_temp_dir0CdVEj/temporary_xcresult_bundle
In file included from /Users/aravindganesh/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/aravindganesh/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
In file included from /Users/aravindganesh/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/FLTWKProgressionDelegate.m:5:
/Users/aravindganesh/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.7.1/ios/Classes/FLTWKProgressionDelegate.h:5:9: fatal error: 'Flutter/Flutter.h' file not found

1
你找到解决方案了吗? - Erick Filho
@ErickFilho,是的,实际上我清理了Flutter缓存,重启了Mac并重新打开了我的IDE和IOS模拟器。似乎是一些缓存问题。尝试清除缓存并重新启动Mac。 - Aravind
1个回答

1

某个符号/类被定义了两次。

  • 检查链接的框架是否有重复。如果有,请删除重复的部分。
  • 清理构建文件夹(Command + Shift + K)。
  • 如果是模拟器,请重置模拟器并尝试。
  • 如果是设备,请重新启动设备并尝试。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接