Brian lee
Brian lee

Reputation: 356

Xamarin Forms Previewer isn't showing

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

Upvotes: 15

Views: 15450

Answers (8)

Felix
Felix

Reputation: 2851

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

Upvotes: 0

Jade
Jade

Reputation: 3244

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.

Upvotes: 0

GaryP
GaryP

Reputation: 233

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.

Upvotes: 0

Foyzul Karim
Foyzul Karim

Reputation: 4492

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.

Upvotes: 0

Kyle White
Kyle White

Reputation: 141

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.

Upvotes: 6

Ton Snoei
Ton Snoei

Reputation: 3195

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/

Upvotes: 0

Brandon Minnick
Brandon Minnick

Reputation: 15342

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

Upvotes: 0

jgoldberger - MSFT
jgoldberger - MSFT

Reputation: 6088

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

Upvotes: 0

Related Questions