I'm getting the following error when trying to preview XAML documents via the Xamarin.Forms Previewer while in Visual Studio.
An Android Application project must reference the project containing this xaml file in order to render in the previewer.
I've tried
Im using Xamarin 4.5.0.486, Android SDK 7.3.1.2, Xamarin.iOS and Xamarin.Mac SDK 10.10, Visual Studio Community Version 2017
You can open the XAML Previewer by clicking the arrows on the split view pane. If you want to change the default split view behavior, use the Tools > Options > Xamarin > Xamarin. Forms XAML Previewer dialog. In this dialog, you can select the default document view and the split orientation.
To open it, go to Debug > Windows > XAML Live Preview. Or, select the Show in XAML Live Preview button in the application toolbar.
The Xamarin. Android Designer allows developers to create and modify declarative layouts visually, without requiring hand-editing of XML files. The Designer also provides real-time feedback that lets the developer evaluate UI changes without having to redeploy the application to a device or to an emulator.
Check your android project and make sure the dll of your PCL/.net standard project is reference. In my own case, its referenced but shows a yellow color. I deleted the reference and re-reference by right clicking on the android project>projects>solution>select the PCL/.net standard project > ok
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With