我昨天将 Mac 升级到了 Sequoia 和 XCode 16,从那以后就无法再构建我的 Flutter 应用程序了。我收到了一堆错误消息,导致我升级所有软件包,重新安装可可豆荚等。错误消息已经改变,我只剩下这个:
Error (Xcode): 'SpeechToTextPlugin' has different definitions in different modules; first difference is definition in module 'speech_to_text.Swift' found method
/Users/username/StudioProjects/projectname/build/ios/Debug-iphonesimulator/speech_to_text/speech_to_text.framework/Headers/speech_to_text-Swift.h:666:0
Modules Issue (Xcode): Definition of 'SpeechToTextPlugin' must be imported from module 'speech_to_text.Swift' before it is required
/Users/username/StudioProjects/projectname/ios/Runner/GeneratedPluginRegistrant.m:131:3
Could not build the application for the simulator.
Error launching application on iPhone 13 mini.
此后,我多次尝试通过repo升级等方式卸载、分解和重新安装cocoapods。我还将我的平台设置为ios 16。我也设置了这样的配置(因为有几个人建议更改这些):
虽然我不太确定这一切到底意味着什么。
arch -x86_64 pod update
命令附注为我工作。