gpt4 book ai didi

Android Studio - 模拟器未运行

转载 作者:行者123 更新时间:2023-12-05 00:04:15 29 4
gpt4 key购买 nike

我收到错误消息“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 已定义,但 $ANDROID_SDK_HOME\avd 中没有文件 Pixel_4.ini

您似乎配置了一个没有图像的模拟器,或者图像可能稍后被删除。

您所要做的就是下载一个有效的模拟器镜像,然后重新配置模拟器,之后您就可以正常工作了

[编辑]:基于有问题的更新

日志中有两条重要信息

  • 未知 AVD 名称 [Pixel_4_XL_API_30],使用 -list-avds 查看有效列表
  • ANDROID_SDK_HOME 已定义,但 $ANDROID_SDK_HOME\avd 中没有文件 Pixel_4_XL_API_30.ini

在第一个错误中,模拟器似乎没有运行,所以错误是关于这个的

在第二个错误中,可能存在一些路径不匹配,导致模拟器在运行前找不到图像。

所以你手动检查路径 $ANDROID_SDK_HOME\avd 你看到你的模拟器图像了吗?然后评论回来

关于Android Studio - 模拟器未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64393195/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com