在ios通用设备上构建失败,但对于模拟器可以

时间:2018-08-09 13:02:18

标签: ios objective-c xcode

我已经从codecanyon下载了一个应用模板。

当我在模拟器上运行时,它运行良好。 但是,当我尝试在真实设备或iOS通用设备上构建时,它失败并显示以下错误:

> duplicate symbol l123 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFAppLinkReturnToRefererView.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFTask.o)
>     duplicate symbol l028 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFTaskCompletionSource.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFMeasurementEvent.o)
>     duplicate symbol l029 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFTaskCompletionSource.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFExecutor.o)
>     duplicate symbol l152 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     duplicate symbol l153 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     duplicate symbol l154 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     duplicate symbol l155 in:
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/Bolts.framework/Bolts(BFWebViewAppLinkResolver.o)
>         /Users/sagar/Downloads/123/FoodDelivery/FoodDelivery/Resources/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDAuthentication.o)
>     .....

ld:架构arm64的91个重复符号 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

我正在使用Xcode 10。 知道如何解决吗?

5 个答案:

答案 0 :(得分:3)

我对Xcode 10 beta 5有相同的问题。尝试安装最新的Beta 6,先安装pod deintegrate,然后安装pod install,然后再尝试在设备上进行构建。就我而言,错误消失了。

答案 1 :(得分:1)

通过强行清除从项目中删除所有pod文件,然后重新安装

 sudo gem install cocoapods-deintegrate cocoapods-clean
 pod deintegrate
 pod clean
 pod install

答案 2 :(得分:0)

Xcode 10 beta 5中存在一个错误,该错误会导致在实际设备上生成错误,并且Xcode 10 beta 6中似乎已修复该错误,升级和错误应已修复

答案 3 :(得分:0)

  

从错误中可以看出,GoogleSign.framework   已经包含Bolts.framework类。尝试删除   项目中的其他Bolts.framework。

答案 4 :(得分:0)

也许您需要进行一次HardClean,转到“产品”,按“ Alt”并选择“ clean build”文件夹。然后打开终端并运行:

rm -rf ~/Library/Developer/Xcode/DerivedData/

打开Xcode,所有内容都会重新编译。

另一个选择是删除框架,并尽可能地再次添加它,因为可能存在重复的引用或类似的引用。