简体   繁体   中英

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:

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. 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 . Add it to the references of your Android project and it should compile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM