即使安装了系统映像,带有Visual Studio的Xamarin也无法检测到模拟器的CPU/ABI系统映像 [英] Xamarin with Visual Studio not detecting CPU/ABI system image for emulator, even though system images are installed

查看:395
本文介绍了即使安装了系统映像,带有Visual Studio的Xamarin也无法检测到模拟器的CPU/ABI系统映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Xamarin与Visual Studio 2017一起使用,让仿真器与API版本25一起使用时遇到很多麻烦.

I'm using Xamarin with Visual studio 2017 and I'm having a lot of trouble getting an emulator to work with API version 25.

我已经安装了系统映像,但是仿真器管理器未检测到它们用于设置AVD.

I have the system images installed, but the Emulator Manager does not detect them for setting up an AVD.

以下是一些屏幕截图: Android SDK屏幕快照,所有图像均已安装

Here's some screenshots: Android SDK Screenshot, all images are installed

Android Emulator Manager屏幕截图,无法检测到CPU/ABI系统映像

我尝试过重新安装Visual Studio和Xamarin,重新安装SDK,修复Visual Studio,重新安装所有东西,等等.

I've tried reinstalling visual studio and xamarin, reinstalling the sdks, repairing visual studio, reinstalling everything again, etc. What do?

推荐答案

@Jon Douglas已经给出了答案,我只是发布一个更详细的答案,以帮助遇到相同问题的人.

@Jon Douglas already given the answer, I just post a more detailed answer in order to help people who has the same problem.

即使安装了系统映像,带有Visual Studio的Xamarin也无法检测到模拟器的CPU/ABI系统映像

Xamarin with Visual Studio not detecting CPU/ABI system image for emulator, even though system images are installed

正如乔恩·道格拉斯(Jon Douglas)所说,最好是升级到最新工具,因为 Google最近不推荐使用这些旧的GUI程序.这是解决您的问题的两种解决方案.

As Jon Douglas said, it would be best to upgrade to the latest tools as Google recently deprecated these old GUI programs. Here are two solutions to solve your problem.

我建议您尝试安装Android Studio,并且您可以共享已安装的Android SDK,因此不会再次下载.

I would recommend you try installing Android Studio, and you can share the already installed Android SDK so it will not download again.

  1. 安装 Android Studio ,Android的官方IDE
  1. Install Android Studio, the Official IDE for Android.

    1. 创建一个空白项目并打开它.

    1. 更改Android SDK路径.
      • a.转到File-> Project Structure
      • b.将SDK位置更改为您的Visual Studio SDK位置
        • 我. Xamarin Android SDK的默认位置为C:\Program Files (x86)\Android\android-sdk,您可以在VS中找到它:Tools -> Options -> Xamarin -> Android Settings
        • II.更改SDK位置时出现问题:不能包含空格.您可以以管理员身份打开CMD并键入:mklink /J C:\Program-Files-(x86) "C:\Program Files (x86)",例如.
        • III.然后,您可以更改SDK的位置,效果.
    1. Change Android SDK Path.
      • a. Go to File -> Project Structure
      • b. Change the SDK location to your Visual Studio SDK Location
        • I. Default Xamarin Android SDK Location is C:\Program Files (x86)\Android\android-sdk, you could find it in VS : Tools -> Options -> Xamarin -> Android Settings
        • II. There is a problem when you change the SDK Location: cannot contain whitespace. You could open CMD as Administrator and type: mklink /J C:\Program-Files-(x86) "C:\Program Files (x86)", like this.
        • III. Then you could change the SDK Location, effect.

    1. 在Android Studio中,转到:Tools -> Android -> AVD Manager -> Create Virtual Device,查看它是否可以使用已安装的系统映像来创建虚拟设备.
    1. In Android Studio, go to: Tools -> Android -> AVD Manager -> Create Virtual Device, see if it works to create a virtual device with system images you have installed.

  • 尝试使用新的AVD管理器: Xamarin Android设备管理器.

    Try using the new AVD Manager: Xamarin Android Device Manager.

    1. 安装设备管理器.

    1. 启动设备管理器

    1. 然后,当您使用此Xamarin Android Device Manager
    1. Then when you use this Xamarin Android Device Manager to create a new device, you should be able to find the system images you have installed.

  • 特别是什么工具?

    What tools in particular?

    我的意思是最新版本的

    I mean the latest version of Xamarin Android Device Manager.

    Android SDK Tools版本26.0.1开始,Google删除了对其基于UI的AVD和SDK管理器的支持,转而使用其新的CLI(命令行界面)工具.

    As of Android SDK Tools version 26.0.1, Google has removed support for their UI-based AVD and SDK managers in favor of their new CLI (Command Line Interface) tools.

    由于此更改,您必须使用 Xamarin SDK管理器

    Because of this change, you must use the Xamarin SDK Manager and Xamarin Android Device Manager when you update to Android SDK Tools 26.0.1 and later (which is required for Android 8.0 Oreo development).

    这篇关于即使安装了系统映像,带有Visual Studio的Xamarin也无法检测到模拟器的CPU/ABI系统映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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