我已尝试使用 NuGet 在我的 Xamarin 项目中添加和实现 native Binding Dll 和 Xamarin.Firebase.iOS.Database,但由于以下错误,我无法构建我的项目:
错误 MT5213:重复符号在:///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/arm64/main.o(与之前的位置相关错误)(MT5213)
Duplicate symbol in:///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/leveldb-library(leveldb_main.o) (位置与之前的相关错误)(MT5213)
另外,我在额外的 mtouch 参数中添加了“--registrar:static”。
请提出解决上述问题的最佳方法。
谢谢。
最佳答案
如果您已正确添加 "--registrar:static" 参数,请尝试按照以下步骤操作 在 Visual Studio 中,
- 打开您的 iOS 项目的项目设置
- 转到构建 > iOS 构建
- 选择配置版本和平台 iPhone * 在支持的架构旁边 选择 ARMv7 + ARM64 而不是 ARMv7 + ARMv7s + ARM64。
并确保更新到 macOS High Sierra
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
此外,this线程可能会有所帮助
关于ios - native 链接失败,重复符号 : '_main' while adding native Binding Dll and Xamarin. Firebase.iOS.Database,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51178283/