本机链接失败,添加本地Binding Dll和Xamarin.Firebase.iOS.Database时重复符号:"_ main" [英] Native linking failed, duplicate symbol: '_main' while adding native Binding Dll and Xamarin.Firebase.iOS.Database

查看:80
本文介绍了本机链接失败,添加本地Binding Dll和Xamarin.Firebase.iOS.Database时重复符号:"_ main"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用NuGet在我的Xamarin项目中添加并实现本机Binding Dll和Xamarin.Firebase.iOS.Database,但由于以下错误,我无法构建我的项目:

I have tried adding and implementing the native Binding Dll and Xamarin.Firebase.iOS.Database in my Xamarin project using NuGet but I am unable to build my project due to below error :

错误MT5213:///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/arm64/main.o中的重复符号(与上一个位置有关错误)(MT5213)

Error MT5213: Duplicate symbol in: ///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/arm64/main.o (Location related to previous error) (MT5213)

以下位置中的重复符号:///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/leveldb-library(leveldb_main.o)(与上一个位置相关的位置错误)(MT5213)

Duplicate symbol in: ///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/leveldb-library(leveldb_main.o) (Location related to previous error) (MT5213)

此外,我在其他mtouch参数中添加了"--registrar:static".

Also, I have added "--registrar:static" in the additional mtouch arguments.

请以最好的方式提出建议,以解决上述问题.

Kindly suggest with the best possible way to resolve the above issues.

谢谢.

推荐答案

如果已正确添加-registrar:static" 参数,请尝试执行以下步骤 在Visual Studio中,

If you have added "--registrar:static" argument properly try to follow below steps In Visual Studio,

  • 打开iOS项目的项目设置
  • 转到构建> iOS构建
  • 选择配置版本和平台iPhone *支持的体系结构旁边 选择ARMv7 + ARM64而不是ARMv7 + ARMv7s + ARM64 .
  • Open the project settings of your iOS project
  • Go to Build > iOS Build
  • Select Configuration Release and Platform iPhone * Next to Supported architectures select ARMv7 + ARM64 instead of ARMv7 + ARMv7s + ARM64.

&确保更新到macOS High Sierra

& make sure Update to macOS High Sierra

最新版本的Xcode需要macOS High Sierra(10.13).开发人员应尽快更新到macOS High Sierra,以支持Xcode 9.3 SDK和API. 在此处

The most recent version of Xcode requires macOS High Sierra (10.13). developers should update to macOS High Sierra as soon as possible in order to support the Xcode 9.3 SDKs and API. Find another possible answer here

此外,线程可能会有所帮助

Moreover, this thread might be helpful

这篇关于本机链接失败,添加本地Binding Dll和Xamarin.Firebase.iOS.Database时重复符号:"_ main"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆