[英]Xamarin.Forms with custom renderer for Android yields compiler error
After upgrading to Xamarin.Forms 1.2.3 I'm getting the following compiler error related to the definition of a custom renderer: 升级到Xamarin.Forms 1.2.3后,我收到与自定义渲染器的定义有关的以下编译器错误:
Error CS0012: The type `Xamarin.Forms.Platform.Android.FormsViewGroup' is
defined in an assembly that is not referenced. Consider adding a reference to
assembly `FormsViewGroup, Version=1.2.3.0, Culture=neutral,
PublicKeyToken=null' (CS0012) (XFormsNavigation.Android)
What is wrong and how can I fix it? 有什么问题,我该如何解决?
Not sure, why you have to add a Xamarin.Forms library manually. 不确定,为什么必须手动添加Xamarin.Forms库。 But here's what to do: 但是,这是怎么做的:
In packages/Xamarin.Forms.1.2.3.6256-pre4/lib/MonoAndroid10/
(or similar depending on your Xamarin.Forms version) you'll find the library FormsViewGroup.dll
. 在packages/Xamarin.Forms.1.2.3.6256-pre4/lib/MonoAndroid10/
(或类似的版本,具体取决于您的Xamarin.Forms版本)中,您将找到FormsViewGroup.dll
库。 Add it to the references of your Android project and it should compile. 将其添加到您的Android项目的引用中,然后进行编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.