问题描述
自从这个伟大的工具对所有人免费开放以来,我尝试了一下,并且特别喜欢Visual Studio Android模拟器.
Since this great tool became free for everyone, I tried it, and I liked it especially Visual Studio Android emulator.
但是,我遇到了一个问题,因为Visual Studio intellisense对于axml文件根本不起作用.
But, I got a problem because Visual Studio intellisense does not work at all for axml files.
我尝试了这篇文章( https://kb.xamarin.com/customer/portal/articles/1920119-how-do-i-enable-intellisense-in-android-axml-files- ),但这些文件(android-layout- xml.xsd,schemas.android.com.apk.res.android.xsd)在我的PC中不存在
I tried this article (https://kb.xamarin.com/customer/portal/articles/1920119-how-do-i-enable-intellisense-in-android-axml-files-) but those files (android-layout-xml.xsd, schemas.android.com.apk.res.android.xsd) does not exist in my PC
推荐答案
- 下载这两个文件( https://raw.githubusercontent.com/atsushieno/monodroid-schema-gen/master/schemas.android.com.apk.res.android.xsd 和https://raw.githubusercontent.com/atsushieno/monodroid-schema-gen/master/android-layout-xml.xsd)到"C:\ Program Files(x86)\ MSBuild \ Xamarin \ Android"(如果没有此类文件).
- 启动"VS2015开发人员命令提示符"
- 执行"devenv/resetsettings"
-
在解决方案中使用打开方式"打开* .axml文件,然后选择自动编辑器选择器(XML)"
- Download this two files (https://raw.githubusercontent.com/atsushieno/monodroid-schema-gen/master/schemas.android.com.apk.res.android.xsd and https://raw.githubusercontent.com/atsushieno/monodroid-schema-gen/master/android-layout-xml.xsd) to "C:\Program Files (x86)\MSBuild\Xamarin\Android" (if there is no such files there).
- Start "Developer Command Prompt for VS2015"
- Execute "devenv /resetsettings"
Open *.axml file in your solution with "Open with" and select "Automatic editor selector (XML)"
如果智能仍然不起作用,请转到XML->模式,手动添加此模式并重新启动Visual Studio.
If intellisence still not working go to XML -> Schemas, add this schemas manually and restart visual studio.
这篇关于如何在Xamarin.Android的AXML上启用智能感知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!