Error MT2002 in xamarin studio (Monotouch)

三世轮回 提交于 2020-01-14 18:43:36

问题


Good day ,

I'm using Xamarin Studio 4.0.12 (build 3) for my iOS app , but I unable to build app to device or iOS simulator due to an error :

Error MT2002: Failed to resolve "System.Void MonoTouch.Foundation.FieldAttribute::.ctor(System.String,System.String)" reference from "monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065

When I change ' Linker Behaviour ' to ' Link SDK assembly only ' that error occur , but if I change to ' Don't Link ' every thing work great , but app size will change from 23mb to 60mb .

Thx


回答1:


The [Field] attribute was added in 6.2.6 (see API diff from release notes).

This means you're using an assembly binary (e.g. bindings) that was compiled with 6.2.6+ and it not compatible with earlier versions of Xamarin.iOS.

You can either try to get an older version of that assembly or update to 6.2.6 (or a more recent version) of Xamarin.iOS.



来源:https://stackoverflow.com/questions/18290115/error-mt2002-in-xamarin-studio-monotouch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!