问题描述
我尝试在Visual Studio中编辑axml
文件,因为拖放操作在Xamarin Studio中不起作用.但是,当我打开axml
文件时,它将永远加载.
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.
我已经等待了10多分钟,但仍在加载中.当我重新启动VS时,我可以打开axml
文件而没有任何问题.
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.
我的所有其他axml
文件(在其他项目中)也是如此.
The same applies for all my other axml
files (in other projects).
有人知道如何解决此问题吗?
Does anyone knows how to fix this?
我正在使用Xamarin btw的最新稳定版本(周期8).
I'm using the newest stable version(cycle 8) of Xamarin btw.
我正在使用Visual Studio Community 2015版本14.0.25425.01更新3,并且已经安装了所有最新更新.
I'm using Visual Studio Community 2015 Version 14.0.25425.01 Update 3 and I've got all the latest updates installed.
更详细的解释:
- 我在Visual Studio中打开项目
- 我打开
foo_bar.axml
文件 - 我从
Designer
标签切换到Source
标签 - 我删除了
android:background="blablabla"
属性 - 我从
Source
标签切换到Designer
标签 -
Designer
选项卡将永远加载
- I open my project in Visual Studio
- I open my
foo_bar.axml
file - I switch from the
Designer
tab to theSource
tab - I remove the
android:background="blablabla"
attribute - I switch from the
Source
tab to theDesigner
tab - The
Designer
tab is loading forever
AND
- 我在Visual Studio中打开项目
- 我打开
foo_bar.axml
文件 - 我做了一些改变
- 我关闭了
foo_bar.axml
文件 - 我重新打开
foo_bar.axml
文件 -
foo_bar.axml
文件将永远加载
- I open my project in Visual Studio
- I open my
foo_bar.axml
file - I make some changes
- I close the
foo_bar.axml
file - I reopen the
foo_bar.axml
file - the
foo_bar.axml
file is loading forever
注意:
当我在第4步更改android:text="blablabla"
属性时,也不会发生此问题,而当我更改某些其他属性时,也不会发生此问题,因此它仅针对某些属性.
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.
推荐答案
根据Xamarin论坛上的论坛者,这与Cycle 8的AXML Designer无法使用最新的API呈现有关.
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.
但是,即使在第8个周期中,当我选择在Android 6.0中而不是在项目属性中使用7.0进行编译时,设计人员仍然会感到不知所措.在一个.axml文件中的设计器"和源"之间切换,并且设计器仍会加载,直到Harambe出现为止.
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.
因此,最好的选择是将Xamarin Studio降级为Cycle 7,最后可以像以前一样使用AXML Designer.在周期9或周期8的增量更新/修补程序出现之前,这是目前的方法.您可以在下面的链接中下载并安装上一个周期: https://store.xamarin.com/account/my/subscription/downloads#cycle7
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
出于您的个人利益,您可以在下面阅读有关上述论坛主题的更多信息: https://forums.xamarin .com/discussion/77992/axml-layout-designer-inside-visual-studio-keeps-永远加载
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
这篇关于Xamarin,Visual Studio 2015-永远加载的AXML设计器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!