Меню Рубрики

Visual studio android emulator windows 10

Требования к системе для эмулятора Visual Studio для Android System requirements for the Visual Studio Emulator for Android

Эмулятор Visual Studio для Android выполняется в виде виртуальной машины в Hyper-V, технологии виртуализации для Windows 8 и более поздних версий. Visual Studio Emulator for Android runs as a virtual machine on Hyper-V, the virtualization technology for Windows 8 and later versions. Чтобы запустить эмулятор, компьютер должен удовлетворять требованиям для запуска Hyper-V, как описано в этом разделе. To run the emulator, your computer must meet the requirements to run Hyper-V as described in this topic.

Программа установки пытается автоматически настроить при установке эмулятора. The setup program tries to configure these prerequisites for you silently when you install the emulator. После успешной настройки необходимых компонентов эмулятор работает надлежащим образом. When setup successfully configures the prerequisites, the emulator simply works as expected. В противном случае необходимые компоненты потребуется включить вручную. Otherwise you may have to enable these prerequisites manually. Если нужно вручную настроить необходимые компоненты, используются те же действия и средства, которые описаны здесь для эмулятора Windows Phone. If you have to configure the prerequisites manually, the steps and tools are the same steps described here for the Windows Phone Emulator.

Программа установки эмулятора проверяет выполнение предварительных требований для запуска эмулятора Visual Studio для Android. The setup program for the emulator checks the prerequisites for running Visual Studio Emulator for Android. Если необходимые компоненты не установлены и не требуются для программы установки, выводятся предупреждения. It displays warnings if the prerequisites are not present, but it does not require them.

Краткий контрольный список Quick checklist

Ниже приведен краткий контрольный список требований для запуска эмулятора Visual Studio для Android. Here is a quick checklist of the requirements for running the Visual Studio Emulator for Android. Более подробные сведения см. в последующих подразделах данного раздела. For more detailed info, see the subsequent sections in this topic.

Требования к системе System requirements

Поддержка Hyper-V (см. требования к Hyper-V ниже) Hyper-V support (see Hyper-V requirements below)

6 ГБ ОЗУ или более 6 GB or more of RAM.

64-разрядная версия профессионального выпуска Windows 8, Windows 8.1, Windows 10 или более поздней версии 64-bit version of the Pro edition of Windows 8, Windows 8.1, Windows10 or higher

Процессор с поддержкой SSSE3 или более поздней версии A processor that supports SSSE3 or later.

Требования к сети Network requirements

Автоматически настраиваемые параметры DNS и шлюза Automatically configured DNS and gateway settings

Требования к Hyper-V Hyper-V requirements

В BIOS должны поддерживаться следующие функции. In the BIOS, the following features must be supported:

Виртуализация оборудования Hardware-assisted virtualization

Преобразование адресов второго уровня (SLAT) Second Level Address Translation (SLAT)

Предотвращение исполнения данных на основе оборудования (DEP) Hardware-based Data Execution Prevention (DEP)

В Windows технология Hyper-V должна быть включена и запущена. In Windows, Hyper-V must be enabled and running.

Необходимо быть членом локальной группы администраторов Hyper-V. You have to be a member of the local Hyper-V Administrators group.

Требования к системе System requirements

Компьютер должен удовлетворять следующим требованиям. Your computer must meet the following requirements:

Поддержка Hyper-V (см. раздел Требования к Hyper-V) Hyper-V support (see Hyper-V requirements)

6 ГБ ОЗУ или более 6 GB or more of RAM.

64-разрядная версия профессионального выпуска Windows 8, Windows 8.1, Windows 10 или более поздней версии 64-bit version of the Pro edition of Windows 8, Windows 8.1, Windows10 or higher.

Чтобы проверить требования к оперативной памяти и Windows, в панели управления выберите «Система и безопасность», а затем — «Система». To check requirements for RAM and Windows, in Control Panel, choose System and Security, and then choose System.

Требования к сети Network requirements

Сеть должна удовлетворять следующим требованиям. Your network must meet the following requirements:

Эмулятору требуется DHCP, так как он настраивается сам как отдельное устройство в сети с собственным IP-адресом. The emulator requires DHCP because it configures itself as a separate device on the network with its own IP address.

Автоматически настраиваемые параметры DNS и шлюза Automatically configured DNS and gateway settings

Вручную настраивать параметры DNS и шлюза для эмулятора невозможно. It’s not possible to configure DNS and gateway settings manually for the emulator.

Сведения об устранении сетевых неполадок в эмуляторе см. в следующих разделах. To troubleshoot networking issues in the emulator, see the following topics:

Требования к Hyper-V Hyper-V requirements

Требования к Hyper-V в BIOS Hyper-V requirements in the BIOS

BIOS компьютера должна поддерживать следующие функции, которые должны быть включены. Your computer’s BIOS must support the following requirements, and they must be enabled:

Виртуализация оборудования Hardware-assisted virtualization

Преобразование адресов второго уровня (SLAT) Second Level Address Translation (SLAT)

Предотвращение исполнения данных на основе оборудования (DEP) Hardware-based Data Execution Prevention (DEP)

Требования к Hyper-V в Windows Hyper-V requirements in Windows

Если параметры компьютера и BIOS уже настроены для поддержки Hyper-V, программа установки включает и запускает Hyper-V. When your computer and BIOS settings are already configured to support Hyper-V, the setup program enables and starts Hyper-V. В противном случае эти функции необходимо включить вручную. Otherwise you may have to enable these requirements manually.

Требование Requirement Проверка и включение этого необходимого компонента How to check and enable this requirement
Необходимо установить Hyper-V. Hyper-V must be installed Выполните те же инструкции, что и для включения Hyper-V для эмулятора Windows Phone. Follow the same instructions used to enable Hyper-V for the Windows Phone emulator.

Проверьте состояние службы Управление виртуальными машинами Hyper-V в оснастке «Службы». Check the status of the Hyper-V Virtual Machine Management service in the Services snap-in.

Технология Hyper-V должна быть запущена. Hyper-V must be running. Дополнительные сведения об управлении службами см. в следующих разделах. For more info about managing services, see the following topics:

Необходимо быть членом локальной группы администраторов Hyper-V. You have to be a member of the local Hyper-V Administrators group.

Чтобы запустить эмулятор Visual Studio для Android без повторяющегося запроса на повышение прав, необходимо быть членом локальной группы администраторов Hyper-V. To run the Visual Studio Emulator for Android without a recurring prompt to elevate your rights, you have to be a member of the local Hyper-V Administrators group. Если при установке пакета SDK вы уже являетесь локальным администратором компьютера, программа установки пакета SDK добавит вас в группу администраторов Hyper-V. If you are already a local administrator on the computer when you install the SDK, the setup program for the SDK adds you to the Hyper-V Administrators group. В противном случае этот компонент необходимо включить вручную. Otherwise you may have to enable this requirement manually.

Если при запуске эмулятора вы еще не являетесь членом группы администраторов Hyper-V, вам будет предложено присоединиться к группе (диалоговое окно ссылается на эмулятор Windows Phone). When you run the emulator, if you are not already a member of the Hyper-V Administrators group, you are prompted to join the group (the dialog box refers to the Windows Phone emulator). Для входа в состав группы требуются права администратора. Joining the group requires administrator rights.

После входа в группу выйдите из системы или выполните перезагрузку, чтобы изменения вступили в силу. After you join the group, log off or reboot to make the change take effect.

Чтобы добавить себя в группу вручную, откройте оснастку «Локальные пользователи и группы». To add yourself to a group manually, open the Local Users and Groups snap-in.

Запуск эмулятора с загрузочного виртуального жесткого диска не поддерживается Running the emulator from a bootable VHD is not supported

При попытке запуска приложения в эмуляторе Visual Studio для Android в случае запуска Windows с загрузочного виртуального жесткого диска для запуска эмулятора обычно требуется несколько минут или же эмулятор может вообще не запуститься. If you try to run an app on the Visual Studio Emulator for Android while you are running Windows from a bootable VHD, the emulator typically takes several minutes to start or fails to start. Если запустить эмулятор не удается, появляется следующее сообщение: «Ошибка при развертывании приложения». When the emulator fails to start, you see the following message: App deployment failed. Повторите попытку. Please try again.

Эта конфигурация не поддерживается. This configuration is not supported. Сведения о связанных проблемах см. в статье Устранение неполадок с эмулятором Android для Visual Studio. For information about related issues, see Troubleshoot the Visual Studio Emulator for Android.

Для Hyper-V требуются несжатые и и незашифрованные файлы Hyper-V requires uncompressed and unencrypted files

На жестком диске, настроенном с файловой системой NTFS, файлы виртуальных жестких дисков, используемых Hyper-V, не должны быть сжаты или зашифрованы. On a hard drive configured with the NTFS file system, the virtual hard disk files used by Hyper-V must be uncompressed and unencrypted. Убедитесь, что следующие каталоги не сжаты и не зашифрованы. Make sure that the following directories are not compressed or encrypted:

C:\Program Files (x86)\Microsoft Emulator Manager C:\Program Files (x86)\Microsoft Emulator Manager

C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android

В файловой системе ReFS файлы виртуального жесткого диска не должны иметь бита целостности. On the ReFS file system, the virtual hard disk files must not have the integrity bit set.

Требования к аппаратной пересылке графики (поддержка OpenGL ES) Hardware graphics forwarding (OpenGL ES support) requirements

Чтобы эмулятор мог эмулировать вызовы в GPU, например используемые OpenGL ES, компьютер должен иметь GPU, совместимый с DirectX и установленный с соответствующими драйверами DirectX. In order for the emulator to emulate calls to the GPU, such as those used by OpenGL ES, your machine must have a DirectX compatible GPU with appropriate DirectX drivers installed.

Источник

Тестирование на устройстве или эмуляторе Android Test on an Android device or emulator

Существует несколько способов тестирования и отладки приложения Android с помощью реального устройства или эмулятора на компьютере Windows. There are several ways to test and debug your Android application using a real device or emulator on your Windows machine. В этом разделе описаны некоторые рекомендации. We have outlined a few recommendations in this guide.

Запуск на реальном устройстве Android Run on a real Android device

Чтобы запустить приложение на реальном устройстве Android, сначала необходимо включить устройство Android для разработки. To run your app on a real Android device, you will first need to enable your Android device for development. Параметры разработчика на Android были скрыты по умолчанию, начиная с версии 4,2, и их включение может варьироваться в зависимости от версии Android. Developer options on Android have been hidden by default since version 4.2 and enabling them can vary based on the Android version.

Подготовка устройства к разработке Enable your device for development

Для устройства под управлением последней версии Android 9.0 +: For a device running a recent version of Android 9.0+:

  1. Подключите устройство к компьютеру разработки Windows с помощью USB-кабеля. Connect your device to your Windows development machine with a USB cable. Вы можете получить уведомление для установки драйвера USB. You may receive a notification to install a USB driver.
  2. Откройте экран параметров на устройстве Android. Open the Settings screen on your Android device.
  3. Выберите о телефоне. Select About phone.
  4. Прокрутите вниз и коснитесь пункта номер сборки семь раз, пока вы не станете разработчиком! Scroll to the bottom and tap Build number seven times, until You are now a developer! . is visible.
  5. Вернитесь на предыдущий экран, выберите система. Return to the previous screen, select System.
  6. Выберите Дополнительно, прокрутите вниз и нажмите кнопку Параметры разработчика. Select Advanced, scroll to the bottom, and tap Developer options.
  7. В окне Параметры разработчика прокрутите вниз, чтобы найти и включить отладку по USB. In the Developer options window, scroll down to find and enable USB debugging.

Сведения об устройстве, на котором работает более старая версия Android, см. в разделе Настройка устройства для разработки. For a device running an older version of Android, see Set Up Device for Development.

Запуск приложения на устройстве Run your app on the device

На панели инструментов Android Studio выберите свое приложение в раскрывающемся меню Run Configurations (конфигурации запуска ). In the Android Studio toolbar, select your app from the run configurations drop-down menu.

В раскрывающемся меню целевое устройство выберите устройство, на котором требуется запустить приложение. From the target device drop-down menu, select the device that you want to run your app on.

Выберите запустить ▷. Select Run ▷. Это приведет к запуску приложения на подключенном устройстве. This will launch the app on your connected device.

Запуск приложения на виртуальном устройстве Android с помощью эмулятора Run your app on a virtual Android device using an emulator

Первое, что нужно узнать о запуске эмулятора Android на компьютере Windows, это то, что независимо от интегрированной среды разработки (Android Studio, Visual Studio и т. д.) производительность эмулятора значительно улучшена за счет поддержки виртуализации. The first thing to know about running an Android emulator on your Windows machine is that regardless of your IDE (Android Studio, Visual Studio, etc), emulator performance is vastly improved by enabling virtualization support.

Включить поддержку виртуализации Enable virtualization support

Перед созданием виртуального устройства с помощью эмулятора Android рекомендуется включить виртуализацию, включив компоненты Hyper-V и платформы низкоуровневой оболочки Windows (ВХПКС). Before creating a virtual device with the Android emulator, it is recommended that you enable virtualization by turning on the Hyper-V and Windows Hypervisor Platform (WHPX) features. Это позволит процессору компьютера значительно повысить скорость выполнения эмулятора. This will allow your computer’s processor to significantly improve the execution speed of the emulator.

Для запуска платформы Hyper-V и низкоуровневой оболочки Windows компьютер должен: To run Hyper-V and Windows Hypervisor Platform, your computer must:

  • Доступно 4 ГБ памяти Have 4GB of memory available
  • Наличие 64-разрядного процессора Intel или ЦП AMD ризен с преобразованием адресов второго уровня (SLAT) Have a 64-bit Intel processor or AMD Ryzen CPU with Second Level Address Translation (SLAT)
  • Запустите Windows 10 Build 1803 + (Проверьте номер сборки) Be running Windows 10 build 1803+ (Check your build #)
  • Обновлены графические драйверы (Device Manager > видеоадаптеры, > обновление драйвера) Have updated graphics drivers (Device Manager > Display adapters > Update driver)

Если компьютер не соответствует этим критериям, вы можете запустить гипервизор Intel HAXM или AMD. If your machine doesn’t fit this criteria, you may be able to run Intel HAXM or AMD Hypervisor. Дополнительные сведения см. в статье аппаратное ускорение для производительности эмулятора или в документации по эмулятору Android Studio. For more info, see the article: Hardware acceleration for emulator performance or the Android Studio Emulator documentation.

Убедитесь, что оборудование и программное обеспечение компьютера совместимы с Hyper-V, открыв командную строку и введя следующую команду: systeminfo Verify that your computer hardware and software is compatible with Hyper-V by opening a command prompt and entering the command: systeminfo

В поле поиска Windows (в нижнем левом углу) введите «компоненты Windows». In the Windows search box (lower left), enter «windows features». Выберите Включение или отключение компонентов Windows в результатах поиска. Select Turn Windows features on or off from the search results.

После появления списка компонентов Windows прокрутите экран, чтобы найти Hyper-V (включая средства управления и платформу) и платформу низкоуровневой оболочки Windows, убедитесь, что флажок установлен, чтобы включить обе функции, а затем нажмите кнопку ОК. Once the Windows Features list appears, scroll to find Hyper-V (includes both Management Tools and Platform) and Windows Hypervisor Platform, ensure that the box is checked to enable both, then select OK.

Перезагрузите компьютер при появлении соответствующего запроса. Restart your computer when prompted.

Эмулятор для разработки машинного кода с Android Studio Emulator for native development with Android Studio

При создании и тестировании собственного приложения Android рекомендуется использовать Android Studio. When building and testing a native Android app, we recommend using Android Studio. Когда приложение будет готово к тестированию, вы можете создать и запустить приложение, выполнив следующие действия. Once your app is ready for testing, you can build and run your app by:

На панели инструментов Android Studio выберите свое приложение в раскрывающемся меню Run Configurations (конфигурации запуска ). In the Android Studio toolbar, select your app from the run configurations drop-down menu.

В раскрывающемся меню целевое устройство выберите устройство, на котором требуется запустить приложение. From the target device drop-down menu, select the device that you want to run your app on.

Выберите запустить ▷. Select Run ▷. Запустится Android Emulator. This will launch the Android Emulator.

После установки приложения на устройстве эмулятора можно использовать параметр Применить изменения для развертывания определенных изменений кода и ресурсов без создания нового apk. Once your app is installed on the emulator device, you can use Apply Changes to deploy certain code and resource changes without building a new APK.

Эмулятор для кросс-платформенной разработки с помощью Visual Studio Emulator for cross-platform development with Visual Studio

Для компьютеров с Windows доступно множество вариантов эмулятора Android . There are many Android emulator options available for Windows PCs. Мы рекомендуем использовать эмулятор AndroidGoogle, так как он предоставляет доступ к последним образам ОС Android и Google Play службам. We recommend using Google’s Android emulator, as it offers access to the latest Android OS images and Google Play services.

Установка эмулятора Android с помощью Visual Studio Install Android emulator with Visual Studio

Если вы еще не установили его, скачайте Visual Studio 2019. If you don’t already have it installed, download Visual Studio 2019. Используйте Visual Studio Installer, чтобы Изменить рабочие нагрузки и убедиться, что у вас есть Рабочая нагрузка для разработки мобильных приложений на .NET. Use the Visual Studio Installer to Modify your workloads and ensure that you have the Mobile development with .NET workload.

Создайте новый проект. Create a new project. После настройки Android Emulatorможно использовать Android Device Manager для создания, дублирования, настройки и запуска различных виртуальных устройств Android. Once you’ve set up the Android Emulator, you can use the Android Device Manager to create, duplicate, customize, and launch a variety of Android virtual devices. Запустите Android Device Manager из меню Сервис с помощью средства: инструменты > Android > Android Device Manager. Launch the Android Device Manager from the Tools menu with: Tools > Android > Android Device Manager.

После открытия Android Device Manager выберите + создать , чтобы создать новое устройство. Once the Android Device Manager opens, select + New to create a new device.

Необходимо присвоить имя устройству, выбрать тип базового устройства из раскрывающегося меню, выбрать процессор и версию ОС, а также несколько других переменных для виртуального устройства. You will need to give the device a name, choose the base device type from a drop-down menu, choose a processor, and OS version, along with several other variables for the virtual device. Дополнительные сведения см. Android Device Manager главном экране. For more information, Android Device Manager Main Screen.

На панели инструментов Visual Studio выберите Отладка (присоединяется к процессу приложения, выполняемому в эмуляторе после запуска приложения) или режим выпуска (отключает отладчик). In the Visual Studio toolbar, choose between Debug (attaches to the application process running inside the emulator after your app starts) or Release mode (disables the debugger). Затем выберите виртуальное устройство в раскрывающемся меню устройство и нажмите кнопку Play ▷ ( воспроизвести ), чтобы запустить приложение в эмуляторе. Then choose a virtual device from the device drop-down menu and select the Play button ▷ to run your application in the emulator.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Visual studio 2008 установка на windows 7
  • Vista home premium переход на windows 10
  • Virtualenvwrapper установка настройка windows
  • Virtualdub missing codec avc1 windows 10
  • Virtualbox разрешение экрана windows xp 1920 1080