Android Emulator 安裝Android Emulator Setup

本指南說明如何準備 Android Emulator 來測試您的應用程式。This guide explains how to prepare the Android Emulator for testing your app.


Android Emulator 可在各種不同組態中執行,以模擬不同裝置。The Android Emulator can be run in a variety of configurations to simulate different devices. 每個組態都稱為_虛擬裝置_。Each configuration is called a virtual device. 當您在模擬器上部署和測試您的應用程式時,您要選取模擬如 Nexus 或像素電話等實體 Android 裝置的預先設定或自訂虛擬裝置。When you deploy and test your app on the emulator, you select a pre-configured or custom virtual device that simulates a physical Android device such as a Nexus or Pixel phone.

下列章節說明如何加速 Android 模擬器以達到最大效能,如何使用 Android Device Manager 建立及自訂虛擬裝置,以及如何自訂虛擬裝置的設定檔內容。The sections listed below describe how to accelerate the Android emulator for maximum performance, how to use the Android Device Manager to create and customize virtual devices, and how to customize the profile properties of a virtual device. 此外,疑難排解一節會說明常見的模擬器問題和因應措施。In addition, a troubleshooting section explains common emulator problems and workarounds.


硬體加速以提升模擬器效能Hardware Acceleration for Emulator Performance

如何使用 HYPER-V 或 HAXM 虛擬化技術來準備電腦,以達到最大的 Android Emulator 效能。How to prepare your computer for maximum Android Emulator performance by using either Hyper-V or HAXM virtualization technology. 由於 Android Emulator 在沒有硬體加速的情況下可能非常緩慢,因此建議您先在電腦上啟用硬體加速,再使用此模擬器。Because the Android Emulator can be prohibitively slow without hardware acceleration, we recommend that you enable hardware acceleration on your computer before you use the emulator.

使用 Android Device Manager 管理虛擬裝置Managing Virtual Devices with the Android Device Manager

如何使用 Android Device Manager 建立與自訂虛擬裝置。How to use the Android Device Manager to create and customize virtual devices.

編輯 Android 虛擬裝置屬性Editing Android Virtual Device Properties

如何使用 Android Device Manager 編輯虛擬裝置的設定檔內容。How to use the Android Device Manager to edit the profile properties of a virtual device.

Android Emulator Troubleshooting (Android Emulator 疑難排解)Android Emulator Troubleshooting

本文說明執行 Android Emulator 時最常發生的警告訊息和問題,以及因應措施和秘訣。In this article, the most common warning messages and issues that occur while running the Android Emulator are described, along with workarounds and tips.

在您設定好 Android Emulator 之後,請參閱 Debugging on the Android Emulator (在 Android Emulator 上偵錯),以了解如何啟動模擬器,並用其測試和偵錯應用程式的相關資訊。After you have configured the Android Emulator, see Debugging on the Android Emulator for information about how to launch the emulator and use it for testing and debugging your app.


自 Android SDK Tools 26.0.1 版起,Google 移除了對現有 AVD/SDK 管理員的支援,改而提供其新推出的 CLI (命令列介面) 工具。As of Android SDK Tools version 26.0.1 and later, Google has removed support for existing AVD/SDK managers in favor of their new CLI (Command Line Interface) tools. 由於此項取代變更;因此,現在會針對 Android Tools 26.0.1 和更新版本改用 Xamarin SDK/Device Manager,而非 Google SDK/Device Manager。Because of this deprecation change, Xamarin SDK/Device Managers are now used instead of Google SDK/Device Managers for Android Tools 26.0.1 and later. 如需 Xamarin SDK Manager 的詳細資訊,請參閱設定 Xamarin.Android 的 Android SDKFor more information about the Xamarin SDK Manager, see Setting up the Android SDK for Xamarin.Android.