问题
I try to edit an axml file in Visual Studio, because drag and drop doesn't work in Xamarin Studio. But when I open my axml file, it's loading forever.
I've been waiting for more than 10 minutes, but it is still loading. When I restart VS I can open the axml file without any problems.
The same applies for all my other axml files (in other projects).
Does anyone knows how to fix this?
I'm using the newest stable version(cycle 8) of Xamarin btw.
EDIT:
I'm using Visual Studio Community 2015 Version 14.0.25425.01 Update 3 and I've got all the latest updates installed.
More detailed explanation:
- I open my project in Visual Studio
- I open my
foo_bar.axmlfile - I switch from the
Designertab to theSourcetab - I remove the
android:background="blablabla"attribute - I switch from the
Sourcetab to theDesignertab - The
Designertab is loading forever
AND
- I open my project in Visual Studio
- I open my
foo_bar.axmlfile - I make some changes
- I close the
foo_bar.axmlfile - I reopen the
foo_bar.axmlfile - the
foo_bar.axmlfile is loading forever
NOTE:
The problem doesn't happen when I change the android:text="blablabla" attribute at step 4 and when I change some other attributes it also doesn't happen, so it is specific to just some attributes.
回答1:
According to a forumer at Xamarin Forums, it has something to do with Cycle 8's AXML Designer not being able to render using the newest API.
But even in Cycle 8 when I choose to compile under Android 6.0 instead of 7.0 in the project's properties, the designer is still wonky as it is. Switch between "Designer" and "Source" on one .axml file and the designer still loads until Harambe cometh.
Therefore, your best bet is to downgrade Xamarin Studio to Cycle 7, and you can finally get the AXML Designer as working as before. Until Cycle 9 or an incremental update/hotfix of Cycle 8 comes about, this is the way to go for now. You can download and install the previous cycle in the link below: https://store.xamarin.com/account/my/subscription/downloads#cycle7
For your own interest, you can read more about the aforementioned forum thread below: https://forums.xamarin.com/discussion/77992/axml-layout-designer-inside-visual-studio-keeps-loading-forever
回答2:
This happened to me also. Then I realised I hadn't opened Visual Studio in Admin mode. After I did, everything was fine.
回答3:
Open the visual studio as admin and it loads perfectly. All the best.
来源:https://stackoverflow.com/questions/39556585/xamarin-visual-studio-2015-axml-designer-loading-forever