I can't find Main.axml in any Android Template, nor can I open other axml files

佐手、 提交于 2019-12-14 04:19:35

问题


Edit: I also forgot to mention that I tried running Visual Studio as administrator with all the templates up and I still got the same results

Edit2: I figured out that in another place I found the native cross-platform app that has an Main.axml for android

  • Other -> Blank Cross-Platform Mobile App (Native) -> In Layout: Mainaxml

but I can't open it (same problem from before) so I guess I'm missing the Android Designer, any way how to fix that? I can't find anything on google

Original:

First of all, I want to say that I spend 2 days searching the internet and I couldn't find any solutions, I really tried everything, and I have had many many problems with xamarin, here is what I have and what I tried

  • I'm using windows 7
  • I have visual studio 2017 enterprise
  • I downloaded xamarin through the visual studio installed
  • I am using google api 27, (and I have installed 27, 22, and 21)
  • I used haxm (as I have intel processor and windows 7 (so no hyper v for the emulator))
  • I don't have Android Emulator Manager, but I have Android Device Manager (which appears to be the same thing but I really tried fixing that and couldn't find any info anywhere)
  • When I want to start an app, I have to start the emulator manually, and then press "start without debugging" because I don't have the drop down for "debug target"
  • I tried using "open with" on the axml files to find "android designer" and I couldn't find it, I tried searching google a lot and still couldn't find anything
  • I verified that I have installed everything correctly
  • In the bottom are links I followed

Here is what I find when I open any of the following templates

  • Android -> Android App (Xamarin) -> Blank App -> In Layout: activity_main.axml
  • Android -> Android App (Xamarin) -> Single View App -> In Layout: activity_main.axml, content_main.axml
  • Android -> Android XAML App (Xamarin.Forms) -> In Layout: Tabbar.axml, Toolbar.axml
  • Cross-Platform -> Mobile App (Xamarin.Forms) -> Blank App (with all Platforms selected (Android, iOS, Windows (UWP)) and Code Sharing Strategy : .NET Standard) -> In Layout: Tabbar.axml, Toolbar.axml

But none of these axml files can be opened (visual studio freezes and then I have to close it from task manager (I even tried waiting up to an hour, I think in the bottom left it says "item does not support viewing" or something like that))

I would really be very very happy if anyone can help me

links I used:

https://docs.microsoft.com/en-us/xamarin/cross-platform/get-started/installation/windows https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/windows https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-sdk?ide=vs&tabs=vswin https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/index


回答1:


But none of these axml files can be opened --> visual studio freezes and then I have to close it from task manager

This is an issue of Visual Studio 15.7.3, Xamarin team is generating updated builds right now.

For now, here are some workaround:

  • If you need to open a .axml file in VS 15.7.3, you could change its extension name to .xml then open it.

Or:

  • Right-click the .axml file then use "open with" --> eg: choose XML Editor

Update:

Xamarin Team has been generated updated builds to resolve this issue and it only works for VS 15.7.3, for detailed information you could refer to:

  • https://github.com/xamarin/xamarin-android/issues/1777

Fixed:

Visual Studio 15.7.4 has been released and this issue is fixed:

  • https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes#15.7.4
  • https://developercommunity.visualstudio.com/content/problem/266846/axml-file-doesnt-open.html


来源:https://stackoverflow.com/questions/50665411/i-cant-find-main-axml-in-any-android-template-nor-can-i-open-other-axml-files

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