Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

AXML Layout Designer inside Visual Studio keeps loading forever

Hi everybody,

I've got quite an annoying problem that I couldn't find a solution for, so far. It's about the AXML-Designer that always stops working after having rendered layouts for a few times. The Source-view of a layout works as expected and continues to do so, but when I switch to the Designer-view more often than not it just keeps loading and loading without ever again rendering the layout.
The only thing that gets the Designer working again, is closing and re-opening Visual Studio. But as the Designer then successfully renders a layout for only like 1 to 3 times before failing again, I find myself reopening Visual Studio every other minute.

There are no error messages I am aware of. Everything (Java, Visual Studio, Xamarin, Android SDK) should be up to date. Since I'm brand new to Xamarin, I cannot say when exactly the problem began happening.

Any suggestions?

«1

Posts

  • MarkCerezoMarkCerezo USMember ✭✭

    Happening to me too. After I updated my Xamarin to latest version. I kept getting slow with the designer. Hope the guys from Xamarin can help.

  • VetoVeto USMember ✭✭

    Clean the project and try rebuilding. If it is still taking forever to load, you likely have an error somewhere in your layout. Comment out a bunch of your XML and see if it will load with minimal items. Then slowly add back your layout until you figure out what's causing it.

  • FrancFranc GBMember

    I have the same issue I can create and edit several pages but suddenly the designer won't update with my edits. Then I close and reopen the XML file the designer loads forever without the loading text beneath the progress bar, there are no errors and the designer won't load brand new XML pages until I restart Visual Studio 2015.

  • MarkCerezoMarkCerezo USMember ✭✭
    edited September 2016

    Thanks for the info @the_duck!, hope Xamarin guys would do the work to stabilize the new version.

  • Reign_Of_LightReign_Of_Light DEMember ✭✭

    Thanks! Glad to see I'm not the only one. I will try downgrading, as well.

  • AldinHrvatAldinHrvat USMember

    Thank you! Downgrading Xamarin to version 4.1.2.18 (fcbe082) solved my problem.

  • Reign_Of_LightReign_Of_Light DEMember ✭✭

    Mine too :blush: !

  • @the_duck said:
    Try to downgrade the Xamarin version. The designer is most likely a bit buggy. Furthermore I read that it currently can't rendering using the newest API so maybe it mixes something up internally. Downgrading to 4.1.2 worked in my case, maybe it could help you too.

    you saved my life !!

  • @the_duck said:
    Try to downgrade the Xamarin version. The designer is most likely a bit buggy. Furthermore I read that it currently can't rendering using the newest API so maybe it mixes something up internally. Downgrading to 4.1.2 worked in my case, maybe it could help you too.

    Same issue here and this was the fix.

  • RagulChandraRagulChandra INMember ✭✭

    I too have a same problem.If i do so (Downgrade Xamarin) which doesn't support android N as well as iOS 10 .So please can anyone help me to resolve the same in the updated version,.

  • I am also having the same problem, waiting for solution!

  • BobStekeurBobStekeur USMember ✭✭

    This is very frustrating, seems whenever I do an update I end up shooting myself in the foot. Who decides "Stable Release"

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    This sounds quite similar to public bug Bug 43948. A candidate fix for that issue is planned for release in the upcoming "Cycle 8 – Service Release 1" builds, tentatively scheduled for release to an updater channel this week. For a notification of when those builds are available, keep an eye on the Release Blog and watch for the blog post that will be published alongside those new builds.

  • I filed a bug 44997 and as @Ashley_ has said this would be fixed in the upcoming Release Cycle 8 SR1.

    Thanks

  • I am also having the same problem,I am waiting for its' solution. I always scare to update Xamarin, because for fixing old problems you will find new problems.

  • PowersPowers USMember

    I am having a problem I can't seem to find any information on. It is most similar to this one however. Any time I open a layout view (.axml) in the designer, it begins to load, and then totally freezes visual studio. I can't click anywhere, even to exit, and there are no error messages. Task manager shows only .1MB of memory used so its not locked up. This is preventing any work being done. If I am quick, I can click to the source tab and view the code, but it locks up all the same.

    Any guidance on this would be wonderful. I did the 4.8.1 update today but then rolled back to 4.1.2, however this didn't solve the problem.

  • AndreyWDAndreyWD MDMember
    edited November 2016

    I've tried different ways for solving this problem... but, currently [01/11/2016], the single (temporary) solution is to reload the project. Downgrading Xamarin version and restarting VS2015 didn't help.

  • Did Xamarin come up with a solution for this? Or is downgrading the only solution to this issue, currently [06/12/2016]

  • DanielVartdalDanielVartdal USMember ✭✭

    @mohkh: this would propably only solve the build times, not helping with the AXML designer.

    I have the same problem as many people are commenting, and almost exactly like @Powers description:

    @Powers said:
    I am having a problem I can't seem to find any information on. It is most similar to this one however. Any time I open a layout view (.axml) in the designer, it begins to load, and then totally freezes visual studio. I can't click anywhere, even to exit, and there are no error messages. Task manager shows only .1MB of memory used so its not locked up. This is preventing any work being done. If I am quick, I can click to the source tab and view the code, but it locks up all the same.

    Any guidance on this would be wonderful. I did the 4.8.1 update today but then rolled back to 4.1.2, however this didn't solve the problem.

    I can do a change in the layout, check the designer. And it loads (although slow). But, doing changes back and forth a couple of times, makes VS2015 freeze.. And only a restart would help me.. but I can max do a design-change 4-5 times before having to restart.

    I've seen people claiming suspending Resharper can help, but in my case, it only helped on loading time before the freeze..

  • MohananNairMohananNair USMember

    It is painful that this issue is not yet solved. I have downgraded Xamarin to solve this problem few months back and afraid to do any updates until I get a confirmation that this issue is resolved. Also another problem coupled with this is that any changes made in xaml files will not be shown in the deployment. There is continuous failure of deployment with built in emulators. I only remember that everything was working fine till some updates spoiled everything. Can somebody tell which version of update is the best and stable?

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    I can do a change in the layout, check the designer. And it loads (although slow). But, doing changes back and forth a couple of times, makes VS2015 freeze.. And only a restart would help me.. but I can max do a design-change 4-5 times before having to restart.

    @DanielVartdal
    I was able to produce behavior that seems similar to that description on latest Stable, but not Cycle 9 RC in Beta. If you happen to get a chance to try Beta and still hit issues in particular circumstances, bug reports describing those scenarios to facilitate investigation would be much appreciated. Thanks!

  • DanielVartdalDanielVartdal USMember ✭✭

    @AshleyGazich thank you for the feedback. I will try the newest cycle 9 RC when I have the oportunty to do so!

  • ZmasterZmaster USMember ✭✭

    Same issue here... these are the things that ruin the experience with Xamarin. I literally have to restart XS at least 5 times per hour. Can't believe it's been an issue for so long.

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    @Zmaster
    This thread is focused on Android Designer in Visual Studio, and may not be relevant for the Xamarin Studio issue you are having. For troubleshooting a new scenario that is not resolved by the steps earlier in this thread, I would recommend creating a new forum discussion or question. Thanks!

  • RonWhiteRonWhite USMember ✭✭

    I have this same problem. I open the layout file in wordpad and modify it from there.

  • HamedMirzaeiHamedMirzaei USMember

    In most case if you are using sample projects you have to check xaml file carefully
    Click on Solution Explorer -> Right Click on your_xaml_file -> View Code see only code without load design

  • RxhnsRxhns USMember

    happens to me too, I cam from uwp apps and blend for visual studio, is too much advanced than this "designer" we end writting the UI without see anything

  • BobZuradBobZurad USMember ✭✭

    Can confirm that this is still an issue with Visual Studio 2017 and Xamarin 4.5. The axml designer is horrendously slow to render the content.

    I have an old Mac laying around, and I installed Visual Studio for Mac on it and noticed that the axml designer in Visual Studio for Mac works much better. I suggest installing Visual Studio for Mac and loading your project with that.

    I'm sorry that this only helps people who have Macs. If anyone hears of a way to get the axml designer in Visual Studio 2017 working better, please let us know.

  • ahanyahany EGMember

    Faced this issue today with Visual Studio 2017, it was working fine and suddenly stopped to work and won't open any axml file.

    Solved by just close VS and reopen it again whenever this happens, very annoying bug

  • MarkTannehillMarkTannehill USMember

    Seems if you run as Admin it is _much _better. Good luck!

  • RiteshTailorRiteshTailor USMember ✭✭

    @DanielVartdal said:
    @mohkh: this would propably only solve the build times, not helping with the AXML designer.

    I have the same problem as many people are commenting, and almost exactly like @Powers description:

    @Powers said:
    I am having a problem I can't seem to find any information on. It is most similar to this one however. Any time I open a layout view (.axml) in the designer, it begins to load, and then totally freezes visual studio. I can't click anywhere, even to exit, and there are no error messages. Task manager shows only .1MB of memory used so its not locked up. This is preventing any work being done. If I am quick, I can click to the source tab and view the code, but it locks up all the same.

    Any guidance on this would be wonderful. I did the 4.8.1 update today but then rolled back to 4.1.2, however this didn't solve the problem.

    I can do a change in the layout, check the designer. And it loads (although slow). But, doing changes back and forth a couple of times, makes VS2015 freeze.. And only a restart would help me.. but I can max do a design-change 4-5 times before having to restart.

    I've seen people claiming suspending Resharper can help, but in my case, it only helped on loading time before the freeze..

    @mohkh said:
    the solution wrote by @DanielVartdal in this post work fine for me:

    https://forums.xamarin.com/discussion/comment/149090/#Comment_149090

    {
    After e-mailing Xamarin support, they finally came up with a solution that worked for me. The problem was (from my tests) that having around 2000 resource-files(images) slowed the build incredible.

    Putting this propertygroup in the Xamarin Android project:

            <PropertyGroup>
            <AndroidExplicitCrunch>true</AndroidExplicitCrunch >
            </PropertyGroup>
    

    Made my day!

    Build times went from 2 minutes to 30 seconds on re-build of the project (triggered by xml updates etc)
    }

    Thank you it worked !!

  • RickElliottRickElliott USUniversity ✭✭

    I'm still experiencing this issue on Visual Studio 2017 Professional and Xamarin 4.6.0.299 (Xamarin.Android 7.4.0.21). I have three layout sizes (Layout, Layout-sw320dp, Layout-sw720dp) and at best, it renders the designer the first time then afterwards does an endless hang with the progess bar but no Loading layout... text; Visual Studio remains responsive otherwise, but all AXML files seem to hang forever. The only solution is to stop / start Visual Studio. Any ideas would be greatly appreciated. Thanks.

  • ErickGonzalez.3974ErickGonzalez.3974 USMember
    edited September 2017

    I have the same problem with VS 2017, I tried both, v.15.0 and v.15.3 and the result is the same. Please any idea?

  • SteveVSteveV USMember ✭✭

    Same issue here with VS 15.3.2. It's been a year since this was originally posted. Has the been ANY progress with this. It's annoying as hell and a productivity killer. Gotta say than in general VS2017 is buggy as hell.

  • RiaanGreylingRiaanGreyling USMember ✭✭

    This is one of so many issues I have with Xamarin and Visual studio 2015. I'm on the "stable" channel and update whenever there's a new version.

  • eddyizmeddyizm USMember ✭✭

    This problem is so random and prevalent that I've gotten really good at all the other aspects of xamarin android development but my layout skills have fallen behind. Even though I can edit the axml file quite well, quickly seeing my changes is an terrible hindrance. VS2015

  • DooksDooks ZAMember ✭✭✭

    After opening Visual Studio for the first time, the first few loads of *.axml files are quick, after each one you open, it takes a little bit longer each time. So when it becomes unbearable, close visual studio completely, start over.

Sign In or Register to comment.