解決android報(bào)錯(cuò):Intel HAXM is required to run this AVD
今天,簡單講解Android 啟動(dòng)模擬器時(shí),提示錯(cuò)誤:
Intel HAXM is required to run this AVD. VT-x is disabled in BIOS. Enable VT-x in your BIOS security settings (refer to documentation for your computer)的問題。
這個(gè)問題其實(shí)是Android studio是否下載了Download Intel x86 Emulator Accelerator (HAXM installer),所以檢查SDK manager是否下載Download Intel x86 Emulator Accelerator (HAXM installer),如果下載了,那么可能是電腦沒有開啟虛擬化技術(shù),去BIOS開啟Intel虛擬化。
具體步驟如下:
1.首先在SDK Manager中檢查是否安裝Download Intel x86 Emulator Accelerator (HAXM installer),如果沒有安裝,則在SDK Manager中下載安裝Download Intel x86 Emulator Accelerator (HAXM installer)。
2.到SDK目錄下(一般是C:\Users\Administrator\AppData\Local\Android\sdk),在這個(gè)目錄下沿著 extras > intel > Hardware_Accelerated_Execution_Manager 目錄找到intelhaxm-android.exe這個(gè)文件安裝定并運(yùn)行。
3.在安裝的過程中,你可能會(huì)遇到這樣的錯(cuò)誤提示:”Intel virtualization technology (vt,vt-x) is not enabled”,不用擔(dān)心,這時(shí)你只需要進(jìn)入BIOS界面在“configurations”中找到“Intel Virtualization Technology”將其設(shè)置成Enable即可(關(guān)于進(jìn)入BIOS界面的方式不同的電腦大同小異,我的筆記本是聯(lián)想筆記本,所以我在開機(jī)顯示聯(lián)想logo的一瞬間按下F2即進(jìn)入了BIOS界面)。
android 解決錯(cuò)誤:Intel HAXM is required to run this AVD就講完了。
就這么簡單。
補(bǔ)充知識(shí):解決AMD CPU 啟動(dòng)Android模擬器時(shí)無法安裝Intel HAXM 的問題
剛買的電腦,是用的AMD的CPU,在安裝Android開發(fā)環(huán)境時(shí),遇到以下問題:
Failed to install Intel HAXM. For details, please check the installation log: "C:\Users\zhangqs\AppData\Local\Temp\haxm_log9.txt" HAXM installation failed. To install HAXM follow the instructions found at: https://software.intel.com/android/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows Installer log is located at C:\Users\zhangqs\AppData\Local\Temp\haxm_log9.txt Installer log contents: === Logging started: 2020/1/4 13:34:14 === This computer does not support Intel Virtualization Technology (VT-x) or it is being exclusively used by Hyper-V. HAXM cannot be installed. Please ensure Hyper-V is disabled in Windows Features, or refer to the Intel HAXM documentation for more information. === Logging stopped: 2020/1/4 13:34:14 === Done
網(wǎng)上搜了很多辦法,試過下面幾種,都不行。
1.關(guān)閉Hyper-V。
2.禁用Hyper-V相關(guān)的服務(wù)。
3.單獨(dú)下載Intel HAXM安裝。
試了很多次,都失敗了。
我的電腦配置是:

在網(wǎng)上一搜,說是Android Studio已經(jīng)支持AMD CPU的,后面在Android SDK配置項(xiàng)中終于發(fā)現(xiàn)有這么一項(xiàng)。
(根據(jù)下面圖中2處紅色標(biāo)記就可以找到Android對應(yīng)的AMD模擬器驅(qū)動(dòng))

簡單的來說,就是以下步驟:
1.開機(jī)進(jìn)入BIOS,設(shè)置CPU開啟虛擬化。是否開啟,可以通過任務(wù)管理器確定。

2.關(guān)閉Win10的Hyper-V和Windows Hypervisor Platform 和 Windows Sandbox。
(如果不知道是該勾選,還是不勾選,跟下面截圖的選中狀態(tài)一致即可。)

對應(yīng)中文版的系統(tǒng)是:

3.打開命令行,進(jìn)到:
$ANDROID_SDK_ROOT\extras\google\Android_Emulator_Hypervisor_Driver.
($ANDROID_SDK_ROOT\ 是Android SDK的安裝路徑,如果不是安裝在默認(rèn)路徑,需要你手動(dòng)改一下)
運(yùn)行:silent_install.bat,如果執(zhí)行結(jié)果返回是:STATE: 4 RUNNING,說明安裝成功。
至此,就可以使用Android針對AMD處理器的高性能模擬器了。
以上這篇解決android報(bào)錯(cuò):Intel HAXM is required to run this AVD就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
- Android編譯出現(xiàn)Warning:Mapping?new?ns?to?old?ns報(bào)錯(cuò)的解決方案
- Android報(bào)錯(cuò)Error:Could not find com.android.tools.build:gradle:4.1解決辦法
- AndroidStudio報(bào)錯(cuò)Emulator:PANIC:Cannot find AVD system path. Please define ANDROID_SDK_ROOT(解決方案)
- Eclipse新建Android項(xiàng)目報(bào)錯(cuò)解決方案詳細(xì)匯總
- Android studio 切換flutterSDK之后報(bào)錯(cuò)及解決辦法(推薦)
- Android報(bào)錯(cuò)Didn‘t?find?class?“android.view.x“問題解決原理剖析
相關(guān)文章
ScrollView與SeekBar綁定實(shí)現(xiàn)滑動(dòng)時(shí)出現(xiàn)小滑塊效果
這篇文章主要為大家詳細(xì)介紹了ScrollView與SeekBar綁定實(shí)現(xiàn)滑動(dòng)時(shí)出現(xiàn)小滑塊效果,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-10-10
Flutter本地存儲(chǔ)之基本的鍵值對存儲(chǔ)詳解
在原生的?Android?或?iOS?中,都提供了基本的鍵值對存儲(chǔ)方式,在?Flutter?中,提供了?shared_preferences?這個(gè)插件來實(shí)現(xiàn)本地鍵值對數(shù)據(jù)存儲(chǔ),本文就來和大家簡單聊聊吧2023-03-03
Android采取ContentObserver方式自動(dòng)獲取驗(yàn)證碼
Android Studio快捷鍵生成TAG、Log.x日志輸出介紹
Android控件之RatingBar自定義星級(jí)評(píng)分樣式
Android?Activity?View加載與繪制流程深入刨析源碼
android中可以通過兩種方式調(diào)用接口發(fā)送短信
Android WaveView實(shí)現(xiàn)水流波動(dòng)效果

