VS2017上Xamarin的良好安装指南



我有一台装有Windows 10的新计算机,并安装了带有Xamarin的Visual Studio 2017(全部通过2018年3月的Visual Studio 2017安装程序),所有系统要求都非常匹配。我可以做一些编码,它将在模拟器上运行。但是,我想使用 Xamarin.Forms Previewer,由于"出现问题",我无法使用它。连接已关闭"。 此外,我想将Android版本设置为6.0。我安装了所有 API 到 Android 5.0)但我无法选择 API 25/Nougat 7.1 以外的 API。当我转到 AVD 时,由于"没有可用于此目标的 CPU/ABI 系统映像",我无法创建新设备("确定按钮已禁用)。

任何人都可以为Xamarin和其他所需的安装/设置提供很好的教程吗?我搜索了YouTube,但只找到了已经安装/设置了所有内容的视频。我在stackoverflow上浏览了一些类似的问题,但是我认为它们有点过时了(2016年3月/2017年5月)。

感谢您的帮助。 汤姆斯

====

================================================更新: 在 Billys 链接之后,我可以修复预览器问题(卸载任何非 64 位版本的 java),并且可以为所需的 API 级别设置 AVD(下载 CPU/ABI 映像) --> 谢谢比利

但是,在构建时,我收到以下警告:

2>C:UsersThomsDocumentsVisual Studio 2017ProjectstestXamarin3testXamarin3testXamarin3.AndroidtestXamarin3.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for FormsViewGroup.dll (vv8.0) is greater than the $(TargetFrameworkVersion) for your project (v7.0). You need to increase the $(TargetFrameworkVersion) for your project.
2>C:UsersThomsDocumentsVisual Studio 2017ProjectstestXamarin3testXamarin3testXamarin3.AndroidtestXamarin3.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (vv8.0) is greater than the $(TargetFrameworkVersion) for your project (v7.0). You need to increase the $(TargetFrameworkVersion) for your project.
2>C:UsersThomsDocumentsVisual Studio 2017ProjectstestXamarin3testXamarin3testXamarin3.AndroidtestXamarin3.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (vv8.0) is greater than the $(TargetFrameworkVersion) for your project (v7.0). You need to increase the $(TargetFrameworkVersion) for your project.

有没有办法在不增加项目的目标框架的情况下摆脱这些警告(比如减少 Xamarin.Forms.Platform.dll TargetFrameworkVersion)?

但是,我想使用 Xamarin.Forms Previewer,由于"出现问题",我无法使用它。连接已关闭"。

对于这个问题,我认为您可以尝试更新 jdk。 您可以参考以下链接:
Xamarin.Forms Previewer "连接已关闭"
https://forums.xamarin.com/discussion/85221/there-was-an-internal-issue-with-the-rendering-process
https://forums.xamarin.com/discussion/78018/xamarin-form-previewer-is-not showt(英语

:br/

"没有可用于此目标的 CPU/ABI 系统映像">

这通常意味着未为所选的 API 安装某些映像。
例如 ARM EABI v7a 系统映像和英特尔 x86 Atom 系统映像。
最好使用新的 AVD 管理器:Xamarin Android 设备管理器。 您可以参考此链接以获取更多信息。

下面是安装 xamarin 的链接: https://learn.microsoft.com/en-us/xamarin/cross-platform/get-started/installation/windows

最新更新