如何在Xamarin.Android的AXML上启用智能感知? [英] How to enable intellisense on Xamarin.Android's AXML?

查看:92
本文介绍了如何在Xamarin.Android的AXML上启用智能感知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从这个伟大的工具对所有人免费开放以来,我尝试了一下,并且特别喜欢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

推荐答案

  1. 下载这两个文件( 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"(如果没有此类文件).
  2. 启动"VS2015开发人员命令提示符"
  3. 执行"devenv/resetsettings"
  4. 在解决方案中使用打开方式"打开* .axml文件,然后选择自动编辑器选择器(XML)"

  1. 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).
  2. Start "Developer Command Prompt for VS2015"
  3. Execute "devenv /resetsettings"
  4. 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上启用智能感知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆