【问题标题】:Can I debug an Android Xamarin Forms app on a Windows 7 PC?我可以在 Windows 7 PC 上调试 Android Xamarin Forms 应用程序吗?
【发布时间】:2019-07-15 16:57:41
【问题描述】:

我有一台 Windows 7 电脑和一台 Windows 10 电脑。我已经在两者上安装了 Visual Studio 2017,特别是使用 .NET(所有组件)进行移动开发。

我能够在支持 Android 的 Windows 10 PC 上开发 Xamarin Forms 应用程序; IOS 和 UWP。

我尝试在 Windows 7 PC 上为 Android 创建 Xamarin 应用程序。当我尝试在 Windows 7 PC 上启动任何模拟器时;我看到这条消息:

我已经用谷歌搜索过了,我试过了:

1) Changing the platform of the app from AnyCPU to x86.
2) Reinstalling Visual Studio 2017

我之前发现的一篇帖子建议我使用 Google 模拟器而不是 Windows 模拟器。

1) 我在上面的屏幕截图中使用的是 Google 模拟器吗(请注意模拟器上显示的是:“Google APIs”)?

或者

2) 我是否必须安装 Android Studio (https://developer.android.com/studio) 并进行原生 Android 开发才能使用 Google 模拟器?

【问题讨论】:

  • 请更新到VS2017最新版本,看看问题是否依然存在。通过this thread,这个问题已经在Visual Studio 2019修复了。
  • @Jack Hua,这适用于 Windows 7 吗?谢谢。
  • 另外,我找到了system-requirements-for-the-visual-studio-emulator-for-android 的链接,它说您需要Windows 8 及更高版本。看看this thread 并尝试寿司所说的可能会有所帮助。
  • @Jach Hua,是的,我看到了。这非常令人困惑。有的网站说支持,有的说不支持。你知道windows模拟器和google模拟器的区别吗?您可以在 Visual Studio 中使用谷歌模拟器,还是在 android Studio 中开发本机应用程序时使用它们?谢谢。

标签: android visual-studio xamarin.forms


【解决方案1】:

我很确定您不能在 Windows 7 上运行 官方 模拟器。

Android Studio 的Windows system requirements 说:

Android 模拟器仅支持 64 位 Windows

但是,Genymotion 似乎很可能会起作用 - 值得下载和测试。

作为一般警告,我发现用于部署 Xamarin Forms 的 Android 工具链是 Forms 开发中最脆弱的部分。很有可能你可以付出很多努力来设置它,但在 Visual Studio 中仍然会遇到奇怪的、无法诊断的错误。

更新 由于您拥有 64 位 Windows 7,因此值得一试。

一般建议尝试使用普通的 Android Studio 并从其中的模板构建一个简单的应用程序。这适用于测试任何环境,无论是虚拟环境还是连接设备。如果这不起作用,则 Xamarin Forms 的添加层不太可能。

哦,说真的,不要只在模拟器上进行测试。您确实需要在硬件上进行测试。

【讨论】:

  • Windows 7 PC 是 64 位的。在您的链接中它说支持 Windows 7 还是我误解了?
猜你喜欢
  • 1970-01-01
  • 2015-11-28
  • 1970-01-01
  • 1970-01-01
  • 2012-02-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多