ios - Xamarin - 无法再在设备上调试 - 错误 MT5211

标签 ios xamarin.ios xamarin

在最近的升级之前,我可以在设备上进行调试。我现在收到以下错误:

Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_ZipArchiveDelegate", referenced from:
   objc-class-ref in registrar.armv7.o
  _OBJC_CLASS_$_MiniZip_ZipArchive_ZipArchive__ZipArchiveDelegate in registrar.armv7.o
"_OBJC_METACLASS_$_ZipArchiveDelegate", referenced from:
  _OBJC_METACLASS_$_MiniZip_ZipArchive_ZipArchive__ZipArchiveDelegate in registrar.armv7.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error MT5211: Native linking failed, undefined Objective-C class: _OBJC_CLASS_$_ZipArchiveDelegate. If '_OBJC_CLASS_$_ZipArchiveDelegate' is a protocol from a third-party binding, please check that it has the [Protocol] attribute in its api definition file, otherwise verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
error MT5210: Native linking failed, undefined symbol: _OBJC_METACLASS_$_ZipArchiveDelegate. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
error MT5202: Native linking failed. Please review the build log.

我已经清理并重建了但无济于事。有什么想法吗?

最佳答案

原来这个错误是由于新的默认静态注册器的严格性提高引起的:

您可以通过请求 Xamarin.iOS 使用 legacy 注册器来暂时解决该问题。为此,请在“项目选项 -> iOS 构建 -> 其他 mtouch 参数”下添加“--registrar:legacy”。

组件团队还联系了 ZipArchive 组件的作者,让他们了解新注册商的问题,但他们尚未回复。如果他们不很快提供更新,您可以考虑过渡到 Xamarin 组件团队 [1] 编写的同一库的开源绑定(bind)。此绑定(bind)的一个警告是方法和类名称可能与 ZipArchive 组件中的名称不同,并且命名空间肯定不同。因此,您需要相应地更新应用中的名称。

[1] https://github.com/mono/monotouch-bindings/tree/master/ZipArchive

关于ios - Xamarin - 无法再在设备上调试 - 错误 MT5211,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23431137/

相关文章:

ios - PlaygroundPage没有成员(member)评估状态

ios - 如何自动调整 UITableView 的高度?

ios - 导航栏和导航按钮中的单独标题

ios - Xamarin 中的 NSUrlSession

ios - NSAttributedString.initWithHTML 在 MonoTouch 中不可用

ios - UITableViewController 被初始化两次

objective-c - 在 Objective-C 开发中从 iOS 迁移到 Mac 时,NSIntegers 给出类型匹配错误

java - APNS-java 不会在 iOS 应用程序上增加角标(Badge)编号

xamarin.ios - 在 DependencyService 中访问 ViewController 以呈现 MFMailComposeViewController

android - Xamarin 会帮助将 win32 DLL 移植到 android 共享库吗?