本地链接失败,重复的符号:在Xamarin Forms iOS中启用AppCenter崩溃和分析时,重复符号:“ _ cxa + throw”

问题描述 投票:0回答:2

[如下所示,在App.xaml.cs文件中启用AppCenter崩溃和分析时遇到以下错误,

protected override void OnStart()
{
   AppCenter.Start("android={my secret code};" + "ios={my secret code}", typeof(Analytics), typeof(Crashes));
}

如果对此代码发表评论,我没有任何错误。

本地链接失败。请查看构建日志。链接器命令失败,退出代码为1(使用-v查看调用)/Users/macbook-02/Library/Caches/Xamarin/mtbs/builds/MyProject.iOS/fa397694646d06672e8f8c7f7683e7fe/obj/iPhoneSimulator/Debug/mtouch-cache/AppCenterCrashes.a(MSCrashesCXXExceptionHandler.o)中的重复符号(与以前的位置有关)错误)/Users/macbook-02/Library/Caches/Xamarin/mtbs/builds/MyProject.iOS/fa397694646d06672e8f8c7f7683e7fe/obj/iPhoneSimulator/Debug/mtouch-cache/libHockeySDK.a(BITCrashCXXExceptionHandler.o)中的重复符号(与以前的位置有关)错误)1个x86_64体系结构的重复符号本机链接失败,符号重复:“ ___ cxa_throw”。本机链接失败。请查看构建日志。

我试图通过以下链接中给出的答案来解决它,但这不能解决我的问题,

Native linking failed, duplicate symbol: '_main' while adding native Binding Dll and Xamarin.Firebase.iOS.Database

https://github.com/xamarin/GoogleApisForiOSComponents/issues/111

xamarin xamarin.forms xamarin.ios visual-studio-app-center
2个回答
0
投票

我认为您需要通过whether adding the App Center SDK to your solution进行检查。如果您对此进行了跟进,请记住在项目中添加引用:

using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;

然后清理您的项目并重建它。


0
投票

当本机链接程序在所有本机库之间遇到重复的符号时,会发生这种情况。您可以在https://docs.microsoft.com/en-us/xamarin/ios/troubleshooting/mtouch-errors#mt5212-native-linking-failed-duplicate-symbol-上查看有关此错误的详细信息。

© www.soinside.com 2019 - 2024. All rights reserved.