[英]Android Studio - Emulator not running
我收到錯誤“avd 的模擬器進程被殺死”,我研究了這一方面的類似問題,並嘗試了諸如重新安裝 haxm 和運行全新安裝的 android studio 之類的方法。
這是日志,請有人教我我很沮喪
2020-10-16 17:08:00,561 [ 1348] INFO - gs.impl.UpdateCheckerComponent - channel: release
2020-10-16 17:08:00,628 [ 1415] WARN - nSystem.impl.ActionManagerImpl - keymap "ReSharper" not found [Plugin: com.android.tools.ndk]
2020-10-16 17:08:00,648 [ 1435] WARN - nsions.impl.ExtensionPointImpl - Extension to be removed not found: class org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer
2020-10-16 17:08:00,762 [ 1549] WARN - Container.ComponentManagerImpl - Do not use constructor injection (requestorClass=com.android.tools.idea.apk.symbols.DebugSymbolNotifications)
2020-10-16 17:08:01,200 [ 1987] INFO - rd.FirstRunWizardFrameProvider - Overriding welcome frame to be resizable
2020-10-16 17:08:06,410 [ 7197] INFO - manager.EmulatorProcessHandler - Emulator: C:\Users\Cian\AppData\Local\Android\Sdk\emulator\emulator.exe -netdelay none -netspeed full -avd Pixel_4
2020-10-16 17:08:06,427 [ 7214] INFO - roid.tools.idea.adb.AdbService - Initializing adb using: C:\Users\Cian\AppData\Local\Android\Sdk\platform-tools\adb.exe
2020-10-16 17:08:06,439 [ 7226] INFO - manager.EmulatorProcessHandler - Emulator: emulator: ERROR: Unknown AVD name [Pixel_4], use -list-avds to see valid list.
2020-10-16 17:08:06,439 [ 7226] INFO - manager.EmulatorProcessHandler - Emulator: ANDROID_SDK_HOME is defined but there is no file Pixel_4.ini in $ANDROID_SDK_HOME\avd
2020-10-16 17:08:06,439 [ 7226] INFO - manager.EmulatorProcessHandler - Emulator: (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME\avd and $HOME\.android\avd)
2020-10-16 17:08:06,440 [ 7227] INFO - manager.EmulatorProcessHandler - Emulator: Process finished with exit code 1
2020-10-16 17:08:06,441 [ 7228] WARN - manager.EmulatorProcessHandler - Emulator terminated with exit code 1
2020-10-16 17:08:08,508 [ 9295] WARN - #com.android.ddmlib - * daemon not running; starting now at tcp:5037
2020-10-16 17:08:08,529 [ 9316] WARN - #com.android.ddmlib - * daemon started successfully
2020-10-16 17:08:08,537 [ 9324] INFO - #com.android.ddmlib - Connected to adb for device monitoring
2020-10-16 17:08:08,736 [ 9523] INFO - roid.tools.idea.adb.AdbService - Successfully connected to adb
編輯日志
2020-10-16 18:12:02,605 [ 881852] INFO - manager.EmulatorProcessHandler - Emulator: C:\Users\Cian\AppData\Local\Android\Sdk\emulator\emulator.exe -netdelay none -netspeed full -avd Pixel_4_XL_API_30
2020-10-16 18:12:02,631 [ 881878] INFO - manager.EmulatorProcessHandler - Emulator: emulator: ERROR: Unknown AVD name [Pixel_4_XL_API_30], use -list-avds to see valid list.
2020-10-16 18:12:02,631 [ 881878] INFO - manager.EmulatorProcessHandler - Emulator: ANDROID_SDK_HOME is defined but there is no file Pixel_4_XL_API_30.ini in $ANDROID_SDK_HOME\avd
2020-10-16 18:12:02,631 [ 881878] INFO - manager.EmulatorProcessHandler - Emulator: (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME\avd and $HOME\.android\avd)
2020-10-16 18:12:02,631 [ 881878] INFO - manager.EmulatorProcessHandler - Emulator: Process finished with exit code 1
2020-10-16 18:12:02,631 [ 881878] WARN - manager.EmulatorProcessHandler - Emulator terminated with exit code 1
2020-10-16 18:12:32,480 [ 911727] INFO - manager.EmulatorProcessHandler - Emulator: C:\Users\Cian\AppData\Local\Android\Sdk\emulator\emulator.exe -netdelay none -netspeed full -avd Pixel_4_XL_API_30
2020-10-16 18:12:32,506 [ 911753] INFO - manager.EmulatorProcessHandler - Emulator: emulator: ERROR: Unknown AVD name [Pixel_4_XL_API_30], use -list-avds to see valid list.
2020-10-16 18:12:32,506 [ 911753] INFO - manager.EmulatorProcessHandler - Emulator: ANDROID_SDK_HOME is defined but there is no file Pixel_4_XL_API_30.ini in $ANDROID_SDK_HOME\avd
2020-10-16 18:12:32,506 [ 911753] INFO - manager.EmulatorProcessHandler - Emulator: (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME\avd and $HOME\.android\avd)
2020-10-16 18:12:32,506 [ 911753] INFO - manager.EmulatorProcessHandler - Emulator: Process finished with exit code 1
2020-10-16 18:12:32,506 [ 911753] WARN - manager.EmulatorProcessHandler - Emulator terminated with exit code 1
ANDROID_SDK_HOME is defined but there is no file Pixel_4.ini in $ANDROID_SDK_HOME\\avd
您似乎配置了一個沒有圖像的模擬器,或者該圖像可能稍后已刪除。
您所要做的就是下載一個有效的模擬器映像,然后重新配置模擬器,然后您就可以期待一切正常工作
[編輯]:基於相關更新
日志中有兩條重要信息
Unknown AVD name [Pixel_4_XL_API_30], use -list-avds to see valid list
ANDROID_SDK_HOME is defined but there is no file Pixel_4_XL_API_30.ini in $ANDROID_SDK_HOME\\avd
在第一個錯誤中似乎模擬器沒有運行所以錯誤是關於那個
在第二個錯誤中,可能存在一些路徑不匹配,因為在運行之前模擬器未找到圖像。
所以你在路徑$ANDROID_SDK_HOME\\avd
手動檢查你看到你的模擬器圖像了嗎? 然后回復評論
我按照 Github 上的說明進行了這項工作https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows#Installing_Intel_HAXM_on_Windows_via_Android_Studio
將用戶變量 ANDROID_SDK_HOME 設置為 C:\\users\\myusername\\AppData\\Local\\Android\\SDK 然后在命令提示符下,啟動 %ANDROID_SDK_ROOT%\\tools\\emulator –avd <avd_name> -verbose –show-kernel 結果顯示三個與 AVD 相關的環境變量的名稱,然后我添加了指向 C:\\users\\myusername\\ .android\\avd 的 ANDROID_AVD_HOME
在我的機器上,我只有 2GB 的可用磁盤空間。 一旦我釋放了一些高達 ~10GB 的磁盤空間,模擬器就可以正常啟動了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.