Xamarin axml, xml Intellisense not working

二次信任 提交于 2019-12-13 03:56:10

问题


I started using Visual Studio 2017 Enterprise Edition with Version 15.7.4. and Xamarin Version 4.10.0 and need to work on Xamarin native android application.

But Auto fill suggestions not coming in xml and axml files. Intellisense working for widget names(Like TextView, EditText etc.) In layout axml files. But, for widget properties (Like android:layout_width, android:gravity etc.) it isn't working. Where as in styles.xml, menu.xml suggestions not coming at all. I check with following ways.

1) XML - Schemas > android-layout-xml.xsd and schemas.android.com.apk.res.android.xsd files are exists

2) File opened as XML (Text) Editor

3) I didn't find Resharper in Tools

Also, Is there any way to change Xamarin keyboard shortcuts to Android Studio or Eclipse?


回答1:


Being a Xamarin developer for almost two years I have come to terms with the fact that the Xamarin Android intellisense has never worked as it is expected.

It has a lot of bugs and issues (Links below) which have made it a real pain in the neck, But there are workarounds which you have already mentioned above and if those do not work for you trust me nothing will.

https://forums.xamarin.com/discussion/118384/android-designer-does-not-work-well https://forums.xamarin.com/discussion/125879/designer-not-loading-layout-at-all https://forums.xamarin.com/discussion/76851/visual-studio-2015-android-designer-not-working https://forums.xamarin.com/discussion/82082/android-designer-not-working-in-visual-studio-enterprise-2015 https://forums.xamarin.com/discussion/6258/android-designer-doesnt-work-in-vs-2012 https://developercommunity.visualstudio.com/content/problem/99268/xamarin-android-designer-not-working.html

My suggestions:

Android studio provides you with a very strong designer and hence I would simply suggest you use Android studio to write down your XML and then just copy paste it to your Xamarin AXML/XML files and it should work like a charm, Same can be done for any other time of files such as strings or styles XML.

For changing the visual studio shortcuts you can simply check the following guide



来源:https://stackoverflow.com/questions/53800270/xamarin-axml-xml-intellisense-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!