15
votes

I am using xamarin forms v2. 3.2.127 stable on Visual Studio 2015 Community Edition in Windows 10 Operating System. Every time I try to open the xaml, the Xamarin Forms Previewer did not show anything, just a blue box like the screenshot below. I have also tried to create new project even in the latest pre-release channel but it still the same.

enter image description here

8
Haw you built your project?, it won't show without building project firstArtem Zelinskiy
Hi Brian, in my case the preview is only too slow but it's workingEnrico Rossini
@Greensy Yes I have rebuild my project many times.Brian lee
@Enrico Hi Enrico, Are you using the vs community edition ? can you give me your xamarin version ?Brian lee
Yes, I'm using community edition. Microsoft Visual Studio Enterprise 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.6.01038 Xamarin 4.2.0.680 (c4382f5) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android. Xamarin.Android 7.0.0.18 (0e59c36) Visual Studio extension to enable development for Xamarin.Android. Xamarin.iOS 10.0.0.6 (6c3fee4) Visual Studio extension to enable development for Xamarin.iOS.Enrico Rossini

8 Answers

6
votes

Like @jgoldberger said, the XAML previewer is still in early development. However if you are on the Xamarin Stable update channel it might be worth switching to the Beta update channel.

There have been vast improvements in the XAML previewer in the next release, which is currently on the 6th RC iteration (ie. very close to stable). This way you can at least see if the previewer improvements fix your issue. You can always return to the Stable update channel if you choose.

0
votes

The Forms XAML Previewer is still a work in progress and is released as a Preview release. Here is a list of current bug reports, including one I just filed trying to test this myself.

Many of these are private internal bugs, but on my end iOS worked fine for a simple template Forms XAML solution, just the Android would not render but I got an error banner at the top as described in bug #44603

0
votes

Here are a couple troubleshooting steps:

  • Project should be built (compiled) before attempting to preview XAML files
  • The Designer Agent must be set-up the first time you preview a XAML file - a progress indicator will appear in the Previewer, along with progress messages, until this is ready.
  • Try closing and re-opening the XAML file.

  • Invalid XAML: The Android project needs to built before preview can be created. The previewer requires that the project be built before rendering a page. If the error below appears at the top of the preview pane, re-build the application and try again.

enter image description here

Xamarin has some additional documentation on their website for troubleshooting the Xamarin.Forms Previewer

0
votes

Be sure that you install Xamarin.Forms NuGet package >= v2.3 for your Android iOS and PCL projects.

When you get XFPageRendererView as the content of your previewer, try to install the latest Java Development Kit (64 bit version will be OK even though the Visual Studio runs on 32bit). Then go to: Visual Studio > Tools > Options > Xamarin > Android Settings > Change Java Development Kit Location to the newly installed one.

For more information refer to: https://blog.xamarin.com/live-xaml-previewing-with-the-xamarin-forms-previewer/

0
votes

In the latest Xamarin Update, it fixed automatically. Make sure you have installed Java SDK 64 bit version. And you also need to build / rebuild the project before opening the XAML file. For details, you can check my post here. Thanks.

0
votes

If you load the latest version of Java SDK, at this time, it's 9.x and then Xamarin Forms doesn't support that version.

We went to the Xamarin Forms Live. It worked out of the box.

0
votes

As many of the other Answers have said Xamarin Forms is in preview right now.

As an alternative I am using LiveXAML. It isn't a form previewer but uses a different, in many cases superior, approach. The tool allows you to make changes to XAML files while your app is running and you see the changes almost immediately reflected in the app. So what you see isn't a preview but a view of the real thing.

This allows you to interactive with you app like you normally would and make changes on the fly.

It is easy to setup and there is a free trial.

  • Not affiliated with LiveXAML, just a happy customer.
0
votes

My previewer did not work whatever I tried. But it starts to work when I creat a new ContentPage in xaml.