Lỗi your device x86 cpu architecture is not supported nox năm 2024
The emulator runs best if it can use your machine’s hardware, such as the CPU, GPU, and modem, rather than running as pure software. The ability to use your machine’s hardware to improve performance is called hardware acceleration. Show
The emulator can use hardware acceleration to improve your experience in two main ways:
Hardware acceleration is enabled by default on most machines. If it isn't enabled on your machine, this page describes how you can configure graphics and virtual machine (VM) acceleration to get higher performance from the emulator. Configure graphics accelerationGraphics acceleration uses your computer's hardware (typically the GPU) to make screen rendering faster. Android devices use OpenGL for Embedded Systems (OpenGL ES or GLES) for rendering both 2D and 3D graphics on the screen. When you create an Android Virtual Device (AVD) in the AVD Manager, you can specify whether the emulator uses hardware or software to emulate the GPU of the AVD. Hardware acceleration is recommended and is typically faster. However, you might need to use software acceleration if your computer uses graphics drivers that aren't compatible with the emulator. By default, the emulator decides whether to use hardware or software graphics acceleration based on your computer setup. If your GPU hardware and drivers are compatible, the emulator uses the GPU. Otherwise, the emulator uses software acceleration (using your computer's CPU) to simulate GPU processing. If you start the emulator from the , you can override the graphics acceleration setting in the AVD for that virtual device instance. RequirementsTo use graphics acceleration, your development environment must have the following:
Configure graphics acceleration in the AVD ManagerTo configure graphics acceleration for an AVD, follow these steps:
Configure graphics acceleration from the command lineTo specify a graphics acceleration type when you run an AVD from the command line, include the c:\Users\janedoe\AppData\Local\Android> Sdk\emulator\emulator -accel-check accel: 0 AEHD (version 2.0) is installed and usable. accel 2 option, as shown in the following example: emulator -avd avd_name -gpu mode [{-option [value]} ... ] The value of c:\Users\janedoe\AppData\Local\Android> Sdk\emulator\emulator -accel-check accel: 0 AEHD (version 2.0) is installed and usable. accel 3 can be set to one of the following options:
The following c:\Users\janedoe\AppData\Local\Android> Sdk\emulator\emulator -accel-check accel: 0 AEHD (version 2.0) is installed and usable. accel 3 options are deprecated:
Enable Skia rendering for Android UIWhen using images for API level 27 or higher, the emulator can render the Android UI with Skia. Skia helps the emulator render graphics more smoothly and efficiently. To enable Skia rendering, use the following commands in the janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 1 shell:
Configure VM accelerationVM acceleration uses your computer's processor to significantly improve the execution speed of the emulator. A tool called a hypervisor manages this interaction using virtualization extensions that your computer's processor provides. This section outlines the requirements for using VM acceleration and describes how to set up VM acceleration on each operating system. General requirementsTo use VM acceleration with the emulator, your computer must meet the general requirements in this section. Your computer also needs to meet other requirements that are specific to your operating system. Development environment requirementsTo use VM acceleration, your development environment must meet the following requirements:
Virtualization extension requirementsIn addition to the development environment requirements, your computer's processor must support virtualization extensions. Supported processors are:
Additional Requirements for Intel and AMD processors: Second-level address translation (Intel EPT or AMD RVI) is required for Intel and AMD processors. Most modern Intel and AMD processors support second-level address translation. Only the first-generation Intel or AMD processors offering virtualization extensions may not have second-level page translations. If you're unsure whether your processor supports the required extensions, check the specifications for your processor on the manufacturer's site. If your processor doesn't support these extensions, then you can't use VM acceleration. RestrictionsVM acceleration has the following restrictions:
About hypervisorsVM acceleration requires a hypervisor, a tool that uses virtualization extensions provided by your computer's processor. Without a hypervisor and VM acceleration, the emulator must translate the machine code from the VM block by block to conform to the architecture of the host computer. This process can be quite slow. With a hypervisor, when the VM and the architecture of the host computer match, the emulator can run code directly on the host processor using the hypervisor. This improvement drastically increases both the speed and performance of the emulator. The hypervisor that works best for you depends on your computer's operating system and configuration. For more information, see one of the following sections: Check whether a hypervisor is installedYou can use the emulator janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 2 command-line option to check whether a hypervisor is currently installed on your computer. The following examples show how to use the emulator janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 3 option. In each example, janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 4 is the location of the Android SDK: Windows: c:\Users\janedoe\AppData\Local\Android> Sdk\emulator\emulator -accel-check accel: 0 AEHD (version 2.0) is installed and usable. accel There are multiple hypervisor choices on Windows. So what you see might be different from the example here. For example, you may see one of the following keywords in the message: GVM(former name of AEHD), WHPX, HAXM. macOS: janedoe-macbookpro:Android janedoe$ ./Sdk/emulator/emulator -accel-check accel: 0 Hypervisor.Framework OS X Version 13.2 accel Linux: janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. Configure VM acceleration on WindowsVM acceleration on Windows can use one of three hypervisors:
Choose a hypervisor on WindowsThis section shows the criteria to determine which hypervisor to use. The process to configure VM acceleration using each hypervisor is described in the sections that follow. Starting from emulator 33.x.x.x, HAXM is deprecated as Intel discontinues development of HAXM. The Android Emulator hypervisor driver (AEHD) replaces Intel HAXM on Intel Processors. Criteria (emulator 33.x.x.x and higher) Hypervisor You do not need to run Hyper-V at the same time as the Android Emulator. Use . You do need to run Hyper-V at the same time as the Android Emulator. Use . For emulator 32.x.x.x and lower, please continue to follow the old criteria to determine which hypervisor to use. Criteria (emulator 32.x.x.x and lower) Hypervisor You have an Intel processor and do not need to run Hyper-V at the same time as the Android Emulator. Use Intel . You have an AMD processor and do not need to run Hyper-V at the same time as the Android Emulator. Use . You have an Intel or AMD processor and do need to run Hyper-V at the same time as the Android Emulator. Use . Configure VM acceleration using Android Emulator hypervisor driver (AEHD) on WindowsBefore you can install and use the Android Emulator hypervisor driver, your computer must meet the following requirements:
On AMD Processors, the Android Emulator hypervisor driver can be installed via the in Android Studio 4.0 Canary 5 or later. On Intel Processors, the Android Emulator hypervisor driver can be installed via the in Android Studio Flamingo or later. To install from the SDK Manager, follow these steps:
The Android Emulator hypervisor driver can also be downloaded and installed from GitHub. After unpacking the driver package, run janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 5 at a command line with administrator privileges. Uninstall Android Emulator hypervisor driver using the following commands at a command line with administrator privileges: AEHD 2.1 and higher
1 AEHD 2.0 and lower
2 Configure VM acceleration using Intel HAXM on WindowsBefore you can install and use Intel HAXM, your computer must meet the following requirements:
To install the Intel HAXM driver, follow these steps:
For more information, see the installation instructions for Intel HAXM on Windows. To uninstall Intel HAXM, use either the installer or the Windows Control Panel. Before you uninstall Intel HAXM, shut down any running x86 emulators. Configure VM acceleration using Windows Hypervisor PlatformBefore you can enable WHPX, your computer must meet the following requirements:
To install WHPX on Windows, follow these steps:
Double-check when disabling Hyper-VHyper-V must be disabled to use the Android Emulator hypervisor driver or Intel HAXM. However, deselecting "Hyper-V" in the Windows Features Dialog does not guarantee that Hyper-V is disabled. Quite a few features in Windows 10 enable Hyper-V implicitly. Users might not even know Hyper-V is activated when they enable one of these features. These features include:
Additionally, Windows Subsystem for Linux version 2 requires Virtual Machine Platform, meaning that it implicitly requires Hyper-V. This list is not exhaustive; file a bug if you find an item that should be included here. Double-check that the features listed are also disabled when disabling Hyper-V. Reference Microsoft documentation and the examples below to find out how each individual feature can be disabled. Some platforms fail to immediately disable Hyper-V when it is switched off. When this occurs, there is no error returned by the Windows OS and Hyper-V appears disabled in the Windows Features Dialog. Please file a bug on Microsoft's issue tracker when this occurs. Configure VM acceleration on macOSOn MacOS, the Android Emulator uses the built-in Hypervisor.Framework, which requires the MacOS v10.10 (Yosemite) and higher. Configure VM acceleration on LinuxLinux-based systems support VM acceleration through the KVM software package. Follow the instructions for installing KVM on your Linux system, and then verify that KVM is enabled. For Ubuntu systems, see Ubuntu KVM Installation. RequirementsRunning KVM requires specific user permissions. Make sure that you have sufficient permissions as specified in the KVM installation instructions. To use VM acceleration on Linux, your computer must also meet these requirements:
Check whether KVM is currently installed on LinuxYou can use the emulator command-line option to check whether you have KVM installed. Alternatively, you can install the janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 8 package containing the janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 9 command. The following example shows how to use the janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 9 command:
Run the janedoe:~/Android$ ./Sdk/emulator/emulator -accel-check accel: 0 KVM (version 12) is installed and usable. 9 command:
6 Expected output:
7 If you get the following error, it means that you can still run virtual machines. However, your virtual machine is slower without the KVM extensions. |