我在任何 Android 模板中都找不到 Main.axml,也无法打开其他 axml 文件 [英] I can't find Main.axml in any Android Template, nor can I open other axml files

查看:23
本文介绍了我在任何 Android 模板中都找不到 Main.axml,也无法打开其他 axml 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还忘了提到,我尝试以管理员身份运行 Visual Studio 并启动所有模板,但仍然得到相同的结果

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:我发现在另一个地方我发现了原生跨平台应用程序,它有一个 Main.axml for android

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

  • 其他 -> 空白跨平台移动应用(本机) -> 布局中:Mainaxml

但我无法打开它(之前的问题相同)所以我想我错过了 Android Designer,有什么办法可以解决这个问题?我在谷歌上找不到任何东西

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

原文:

首先,我想说我花了2天的时间在互联网上搜索,我找不到任何解决方案,我真的尝试了所有方法,并且我在xamarin上遇到了很多很多问题,这是我所拥有的和什么我试过了

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

  • 我使用的是 Windows 7
  • 我有 Visual Studio 2017 企业版
  • 我通过安装的 Visual Studio 下载了 xamarin
  • 我使用的是 google api 27,(我已经安装了 27、22 和 21)
  • 我使用了 haxm(因为我有英特尔处理器和 Windows 7(所以模拟器没有 hyper v))
  • 我没有 Android 模拟器管理器,但我有 Android 设备管理器(看起来是一样的东西,但我真的尝试修复它,但在任何地方都找不到任何信息)
  • 当我想启动一个应用程序时,我必须手动启动模拟器,然后按启动而不调试",因为我没有调试目标"的下拉菜单
  • 我尝试在 axml 文件上使用打开方式"来查找android 设计器"但我找不到它,我尝试在谷歌上搜索了很多但仍然找不到任何东西
  • 我确认我已正确安装所有内容
  • 底部是我关注的链接

这是我打开以下任何模板时发现的内容

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

  • Android -> Android 应用 (Xamarin) -> 空白应用 -> 在布局中:activity_main.axml
  • Android -> Android App (Xamarin) -> Single View App -> 在布局中:activity_main.axml, content_main.axml
  • Android -> Android XAML 应用 (Xamarin.Forms) -> 在布局中:Tabbar.axml、Toolbar.axml
  • 跨平台 -> 移动应用程序 (Xamarin.Forms) -> 空白应用程序(选择所有平台(Android、iOS、Windows (UWP))和代码共享策略:.NET Standard)-> 在布局中:Tabbar.axml, Toolbar.axml

但是这些 axml 文件都不能打开(visual studio 死机,然后我必须从任务管理器中关闭它(我什至尝试等了一个小时,我想在左下角它说项目不支持查看"或类似的东西))

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

我使用的链接:

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

推荐答案

但是这些axml文件都不能打开-->Visual Studio 死机,然后我必须从任务管理器中关闭它

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

这是 Xamarin 团队 Visual Studio 15.7.3 的问题正在生成更新的版本.

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

目前,这里有一些解决方法:

For now, here are some workaround:

  • 如果您需要在 VS 15.7.3 中打开 .axml 文件,您可以将其扩展名更改为 .xml 然后打开它.
  • If you need to open a .axml file in VS 15.7.3, you could change its extension name to .xml then open it.

或者:

  • 右键单击 .axml 文件,然后使用打开方式"-->例如:选择XML Editor
  • Right-click the .axml file then use "open with" --> eg: choose XML Editor

Xamarin Team 已生成更新版本来解决此问题,它仅适用于 VS 15.7.3,有关详细信息,您可以参考:

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:

Visual Studio 15.7.4 已发布,此问题已修复:

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

这篇关于我在任何 Android 模板中都找不到 Main.axml,也无法打开其他 axml 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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