尝试在Iphone上启动我的应用程序时出现此错误。我该如何解决?
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
duplicate symbol '_pb_field_iter_next' in:
/Users/johndoe/Library/Developer/Xcode/DerivedData/Runner-awmjwtlfwtwzmhcficfyhoavvpwe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/pb_common 2.o
/Users/johndoe/Library/Developer/Xcode/DerivedData/Runner-awmjwtlfwtwzmhcficfyhoavvpwe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/pb_common.o
duplicate symbol '_pb_field_iter_begin' in:
/Users/johndoe/Library/Developer/Xcode/DerivedData/Runner-awmjwtlfwtwzmhcficfyhoavvpwe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/pb_common 2.o
/Users/johndoe/Library/Developer/Xcode/DerivedData/Runner-awmjwtlfwtwzmhcficfyhoavvpwe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/pb_common.o
duplicate symbol '_pb_field_iter_find' in:
ld: 35 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
答案 0 :(得分:0)
我遇到了同样的问题,但我发现这可行。
1-更新Xcode。
2-将Flutter升级到终端中的最新版本:Flutter升级
3-使用以下命令更新可可豆荚:$ sudo gem install cocoapods
4-在Android Studio终端运行中:先清理干净然后再运行
之后,问题解决了。
答案 1 :(得分:0)
我设法解决了这个问题。我正在观看YT介绍,以通过模拟器实时调试 flutter / dart / ios 。
结果是我需要更新flutter及其相关文件。
我刚跑过flutter upgrade --force
。我相信这会覆盖以前保存的所有设置,因此在强制升级之前,请备份您的工作。但是,在运行并更新所有内容之后,它又再次对我有效。