Xamarin Forms Previewer isn't showing

2»

Answers

  • KramarKramar Joseph Kramar 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.

  • MichaelGeraceMichaelGerace Michael Gerace USMember

    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 Mark Caple 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 Benjamin Mayrargue FRBeta ✭✭✭

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

  • GiggasGiggas Bruno Cardoso 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 Bob Howard 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 Owen Gunter GBMember

    Hi

    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

  • MartinSchneider.9449MartinSchneider.9449 Martin Schneider USMember

    @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
    Xamarin 4.2.0.703
    Java\jdk1.7.0_79

  • SamChan.8893SamChan.8893 Sam Chan 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 Alexis Nowikowski 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
    Xamarin 4.2.0.703
    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 Iuliia Tsikal DEMember ✭✭✭

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

    Solution:

    • 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?

  • dustinkimbledustinkimble dustin kimble USMember

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

  • dustinkimbledustinkimble dustin kimble USMember

    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 Pablo Vianini USMember
    edited November 2016

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

    Thanks!

  • HenryAleHenryAle Henry Hernandez 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 Iuliia Tsikal DEMember ✭✭✭

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

    Thanks!

    I asked over Twitter. I was told officially NO

  • CostasAletrariCostasAletrari Costas Aletrari 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 Vincent Wang 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 Alan McGovern 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 David Sielaff 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 2.3.3.168. 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)
    Runtime:
    Mono 4.6.2 (mono-4.6.0-branch/08fd525) (64-bit)

    Xamarin.Android
    Version: 7.0.2.37 (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)

    Xamarin.Mac
    Version: 2.10.0.113 (Visual Studio Enterprise)

    Xamarin.iOS
    Version: 10.2.1.5 (Visual Studio Enterprise)

    Operating System
    Mac OS X 10.12.1

  • HOLHOL Ric Hol USMember

    Hi

    I solved this issue by updating Xamarin with alpha version.
    Please check following url.
    https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/

    Thanks.

  • VetaLioSTVVetaLioSTV VetaLio STV USMember ✭✭
    edited January 20

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

  • ericwu1991ericwu1991 Eric Wu BRMember
    edited January 25

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

  • batmacibatmaci Iuliia Tsikal 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 ramin USMember

    I have published a post - step by step running this tool
    https://goo.gl/UPY29B

  • MDarwishMDarwish Mohamad Mahmoud 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 Vicente G. Guzman Lucio MXUniversity ✭✭✭
    edited February 3
  • BenoistLUGNIERBenoistLUGNIER Benoist LUGNIER 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 (4.2.2.11)
    • 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 Dmitry Grudkin RUMember ✭✭

    @MarkCaple said:
    Wooohoooo!!!

    image

    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

    image

    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.

2»
Sign In or Register to comment.