Xamarin Forms Previewer isn't showing



  • KramarKramar USMember

    @softlion said:

    It seems that, as soon as there is a rendering exception, you'll always get the exception until you retard VS completely. On my other project the exception is thrown by a Telerik component.

    Yes. I can't confirm it happens on every rendering exception, but at some point it does and the only way to get the previewer back is to restart VS.

  • I can't be the only person who finds it absolutely absurd that you must be connected to a MAC build host for previewing to work... How can MS buy you out and then you treat VS like a second-class citizen?

  • MarkCapleMarkCaple USMember

    MichaelGerace, you cannot really blame Microsoft for this. Unfortunately Apple's licencing model is such that you can not run a Mac OS on anything other than a Mac. It is obviously possible as any Hackintosh search will show you how but Microsoft's hands are pretty much tied. This is an early release and I am sure Microsoft will try everything in their power to improve the preview option.

  • softlionsoftlion FRBeta ✭✭✭

    @MarkCaple read the full discussion, you're off topic.

  • GiggasGiggas PTMember

    Same problem for me!!! my designer doesn't open :sweat:

    I'm working with VS 2015 Community - Xamarin Forms for UWP...
    I don't have Android or Mac project at this moment...

  • BobHowardBobHoward USMember ✭✭

    Yes, I can confirm that a Mac connection is required for even Android preview. It was just a blank screen, then I connected my Mac and it started launching something, however, whatever it launched doesn't work because I get the XFPageRendererView error and nothing else. No idea why they would release something that is so obviously broken.

  • OwenGunterOwenGunter GBMember


    It does appear you need the Mac Agent in order to run this. I had a Mac Mini (which I don't really use much) but once I connected this using the Xamarin Mac Agent the previewer kicked into life. The previewer isn't perfect but it's a nice start.

    There are other extensions (visual studio) and apps that do similar and so if you don't have a Mac there are alternatives; although it's nice to have it integrated into the IDE

  • @MarkCaple said:

    After looking in Xamarin log file I noticed

    Where is this log file?

    I have done what you said, but didn't solved the problem for me.

    Win 10 14393.321
    VS 14.0.25431.01 Update 3

  • SamChan.8893SamChan.8893 USMember
    edited October 2016

    Hi, do anyone encounter the problem shown in the attached image ?

    The following is the stacktrace in ide log.

    Xamarin.VisualStudio.ActivationManager Error: 0 : [2016-10-20 12:07:15.8595] Couldn't render Android XAML
    System.ArgumentNullException: Value cannot be null.
    Parameter name: array
    at System.Array.ConvertAll[TInput,TOutput](TInput[] array, Converter`2 converter)
    at Xamarin.Designer.ProxiedException.Init(Exception ex)
    at Xamarin.Designer.ProxiedException..ctor(Exception ex)
    at Xamarin.Designer.Forms.Preview.AndroidXamlRenderer.d__14.MoveNext()

  • DarxisDarxis PLMember

    Same problem here, light blue background saying "Android Phone"/"iOS Phone".

    Windows 10 Pro x64 10.0.14393
    VS 2015 Enterprise 14.0.25431.01 Update 3
    Android SDK Tools 25.2.2
    Android NDK r13

    Everything updated to the latest version (Windows/VS/Xamarin/Android SDK Manager packages/Android NDK).

  • batmacibatmaci DEMember ✭✭✭✭

    @softlion said:
    I found the solution and the log file.


    • update your Android NDK to r12b (i had r10e) and specify this sdk path in Tools > Options > Xamarin > Android
    • clear the current user's temp folder C:\Users(your login name)\AppData\Local\Temp
    • restart VS

    Log file:

    • use VS help menu, Xamarin > Logs. Open the last .svclog file

    what is Android NDK for? it says it is native toolset. why do I need it? I dont have it installed at all. is it a problem?

  • I've tried everything mentioned, still can't get it to work. Logs don't show anything either :/ . Anyone else have an official solution?

  • Update: Only got it to work when connecting with my Mac (as other have said...). Finally saw the "initializing designer" message. Was hopeful it would work after a VS restart and not connected to my mac, but no luck :(

  • PabloVianiniPabloVianini USMember
    edited November 2016

    Hello @AlanMcGovern could you tell if there is already available the view for android without connection with mac?


  • HenryAleHenryAle USMember

    I have this error in Xamarin Log:

    Xamarin.VisualStudio.Forms.Previewer.PreviewerToolWindow Error: 0 : [2016-11-22 23:46:22.8881] Unexpected exception trying to swap text buffers for the Xamarin.Forms previewer
    System.Collections.Generic.KeyNotFoundException: key
    at Microsoft.VisualStudio.Utilities.PropertyCollection.GetProperty(Object key)
    at Microsoft.VisualStudio.Text.ITextBufferExtensions.GetFilePath(ITextBuffer textBuffer) in c:\data\lanes\3513\47830f6b\source\xamarinvs\src\Features\VisualStudio.Forms.Previewer\ITextBufferExtensions.cs:line 75
    at Xamarin.VisualStudio.Forms.Previewer.PreviewerToolWindow.<>c__DisplayClass42_0.b__0(ITextView t) in c:\data\lanes\3513\47830f6b\source\xamarinvs\src\Features\VisualStudio.Forms.Previewer\PreviewerToolWindow.cs:line 290

  • batmacibatmaci DEMember ✭✭✭✭

    @PabloVianini said:
    Hello @AlanMcGovern could you tell if there is already available the view for android without connection with mac?


    I asked over Twitter. I was told officially NO

  • CostasAletrariCostasAletrari USMember ✭✭

    very odd for me to.

    I've updated to the latest xamarin
    I've updates to the latest xamarim via nuget
    I've updated android SDK to version 24
    updated the product to make sure the build is set to use api 24
    Connection to the mac is done and i can see my xmal preview working fine for the IOS

    but still not for the android.

    i no longer get just the blue screen

    I now get a black screen with "XFPagerendererVew" displayed

    I tried rebuilding the project

    i tried restart Visual Studio 2015 Professional

    just the black screen.

    dam :-(

  • VincentwxVincentwx CAMember ✭✭

    @AlanMcGovern said:
    The update to allow the Android Previewer to work when there is no connection to the Mac has not shipped yet. It may not make it into the next refresh of the Alpha channel, but it should make it into the one after that. It is top one of our priorities right now.

    Is there any time line for this update, such as earlier 2017, or even later?

  • AlanMcGovernAlanMcGovern USXamarin Team Xamurai

    This feature should work as part of the release which is currently in the Alpha channel. We are still actively making improvements to the workflow, so if you encounter any issues do let us know!

  • DavidSielaffDavidSielaff USUniversity

    While everybody else seems to be able to run the Previewer on Macs, sadly, I'm not able to.

    When I right-click on a XAML file with a ContentPage and select Open With > XAML Viewer, usually nothing happens. Sometimes the the Previewer opens and correctly shows a preview, however it does not stay current with changes to the XAML file.

    The solution I'm using is pretty much just the Xamarin.Forms XAML template for a new solution, and it does build and can run in the simulator.

    I think I've got everything up to date, and am using Xamarin.Forms It doesn't look like it's shown below, but I've got Android ndk-r13b installed.

    What am I missing?

    Xamarin Studio Enterprise
    Version 6.1.2 (build 44)
    Mono 4.6.2 (mono-4.6.0-branch/08fd525) (64-bit)

    Version: (Visual Studio Enterprise)
    Android SDK:
    Supported Android versions:
    4.0.3 (API level 15)
    4.4 (API level 19)
    5.0 (API level 21)
    6.0 (API level 23)
    7.0 (API level 24)

    SDK Tools Version: 25.2.3
    SDK Platform Tools Version: 25.0.1
    SDK Build Tools Version: 25.0.1

    Java SDK: /usr
    java version "1.8.0_112"
    Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
    Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)

    Apple Developer Tools
    Xcode 8.1 (11544)

    Version: (Visual Studio Enterprise)

    Version: (Visual Studio Enterprise)

    Operating System
    Mac OS X 10.12.1

  • HOLHOL USMember


    I solved this issue by updating Xamarin with alpha version.
    Please check following url.


  • VetaLioSTVVetaLioSTV USMember ✭✭
    edited January 2017

    Xamarin Studio 6.1 stable ( OS X ).
    I'm getting this pretty frequently. Can someone explain how to workaround that? Thanks. :/

  • ericwu1991ericwu1991 BRMember
    edited January 2017

    @AlanMcGovern any updates regarding the previewer?
    Never mind that. Missed the comment in which you said it was already in alpha.

  • batmacibatmaci DEMember ✭✭✭✭

    even this previewer works ( in my case, it works mostly for IOS but very often xaml cant be previewed for android), it is not mature yet and It just a bad display. you cant manage anything. However if you want to see how your layout displayed and you can play with the values life time, you can use uwp mobile. It will not be 100% the same as Android or IOS but it will give you some idea at least. I found using UWP with live inspection is best match until we get a designer

  • ramin.0894ramin.0894 USMember

    I have published a post - step by step running this tool

  • MDarwishMDarwish LBMember

    actually, I prefer to to add controls from code behind, and also I have same issue when I am trying to use XAML Previewer

  • LucioMSPLucioMSP MXUniversity ✭✭✭
    edited February 2017
  • BenoistLUGNIERBenoistLUGNIER FRMember ✭✭

    Thanks for sharing LucioMSP but in english please. Lot of people speak only their language and english.

    By the way I made it run under visual studio 2015 Update 3 :

    • upgrade Xamarin for VS at the last stable version (
    • install JDK at the last version (1.8.0_121)
    • install NDK at the last version (r13b)
    • connect to the mac (it seem you have to be connected to a mac for initialisation)
    • compile your xamarin forms projet

    And it's working immediatly for me.

    Hope this will help

  • DmitryBlackDmitryBlack RUMember ✭✭

    @MarkCaple said:


    After looking in Xamarin log file I noticed

    ERROR: java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\MSBuild\Xamarin\Android\libmono-android.debug.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform

    So I Installed the 64 bit JDK version from oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

    And changed my Xamarin Options to


    And yippee!!

    That helped, but there was a new problem. Tell me how to set up Java for Windows x64, so that it does not take all the available physical memory? I have 8 gigabytes, and after about 15 minutes, all of the available physical memory takes Java SE process. Attempts to analyze and adjust the example (https://plumbr.eu/blog/memory-leaks/why-does-my-java-process-consume-more-memory-than-хмх) nor to no avail. I install the latest version of Java 1.8.

Sign In or Register to comment.