简体   繁体   English

Android Studio 错误:无法在模拟器中启动 AVD

[英]Error with Android Studio: Cannot launch AVD in emulator

The ERROR: resizing partition e2fsck failed with exit code 1.错误:调整分区 e2fsck 的大小失败,退出代码为 1。

I have made sure that I follow this video exactly when setting up my AVD.我已确保在设置 AVD 时完全遵循此视频。 Whenever I run the AVD with the x86_64 System Image, I get the following message:每当我使用 x86_64 系统映像运行 AVD 时,都会收到以下消息:

Cannot launch AVD in emulator.无法在模拟器中启动 AVD。 Output: Creating filesystem with parameters: Size: 69206016 Block size: 4096 Blocks per group: 32768 ERROR: resizing partition e2fsck failed with exit code 1 Inodes per group: 4224 Inode size: 256 Journal blocks: 1024 Label: Blocks: 16896 Block groups: 1 Reserved block group size: 7 Created filesystem with 11/4224 inodes and 1302/16896 blocks Hax is enabled Hax ram_size 0x60000000 HAX is working and emulator runs in fast virt mode.输出:使用参数创建文件系统:大小:69206016 块大小:4096 每组块:32768 错误:调整分区 e2fsck 的大小失败,退出代码为 1 每组索引节点:4224 索引节点大小:256 日志块:1024 标签:块:16896 块组: 1 保留块组大小:7 创建的文件系统具有 11/4224 个 inode 和 1302/16896 个块 Hax 已启用 Hax ram_size 0x60000000 HAX 正在工作,模拟器在快速虚拟模式下运行。 emulator: Listening for console connections on port: 5554 emulator: Serial number of this emulator (for ADB): emulator-5554 emulator: WARNING: The -scale flag is obsolete and will be ignored.模拟器:侦听端口上的控制台连接:5554 模拟器:此模拟器的序列号(对于 ADB):emulator-5554 模拟器:警告:-scale 标志已过时,将被忽略。

Whenever I run it with the regular x86 System Image, I get this message:每当我使用常规 x86 系统映像运行它时,我都会收到以下消息:

Cannot launch AVD in emulator.无法在模拟器中启动 AVD。 Output: emulator: WARNING: userdata partition is resized from 550 M to 800 M ERROR: resizing partition e2fsck failed with exit code 1 Hax is enabled Hax ram_size 0x60000000 HAX is working and emulator runs in fast virt mode.输出:模拟器:警告:用户数据分区的大小从 550 M 调整到 800 M 错误:调整分区 e2fsck 的大小失败,退出代码为 1 Hax 已启用 Hax ram_size 0x60000000 HAX 正在运行,模拟器在快速虚拟机模式下运行。 emulator: Listening for console connections on port: 5554 emulator: Serial number of this emulator (for ADB): emulator-5554 emulator: WARNING: The -scale flag is obsolete and will be ignored.模拟器:侦听端口上的控制台连接:5554 模拟器:此模拟器的序列号(对于 ADB):emulator-5554 模拟器:警告:-scale 标志已过时,将被忽略。

I have a computer that is a 64-bit system that runs Windows 10. I have tried both the Lollipop 22 x86_64 and Lollipop 22 x86 System Images and they both fail.我有一台运行 Windows 10 的 64 位系统计算机。我尝试了 Lollipop 22 x86_64 和 Lollipop 22 x86 系统映像,但它们都失败了。

I cannot figure out what the issue is.我无法弄清楚问题是什么。 Any help would be greatly appreciated.任何帮助将不胜感激。

Thank you谢谢

set Memory=1024 MB and Internal storage =550 MB I have solved this error for my emulator设置内存=1024 MB 和内部存储=550 MB 我已经为我的模拟器解决了这个错误

在此处输入图片说明

resizing partition e2fsck failed调整分区 e2fsck 失败

This can happen if the underlying file system for that AVD has errors, and the emulator is unable to mount it.如果该 AVD 的底层文件系统有错误,并且模拟器无法挂载它,就会发生这种情况。 It isn't exactly straight forward to fix e2fsck for that file system in Windows, but its possible.在 Windows 中为该文件系统修复 e2fsck 并不完全是直接的,但它是可能的。

At this point, it'll be important to add that using Genymotion could be easier and perfectly normal in your case.在这一点上,重要的是要补充一点,在您的情况下使用Genymotion可能更容易且完全正常。

To solve the partition issue on Windows:要解决 Windows 上的分区问题:

Install Cygwin and run the e2fsck cmd安装 Cygwin 并运行 e2fsck cmd

# Navigate to AVD
cd ~/.android/avd/Nexus5
e2fsck -f userdata-qemu.img

For more information, refer to the following links:有关更多信息,请参阅以下链接:

https://superuser.com/questions/739710/running-fsck-from-cygwin-shell https://superuser.com/questions/739710/running-fsck-from-cygwin-shell

Android emulator Error:- executing /system/bin/e2fsck failed: No such file or directory Android 模拟器错误:- 执行 /system/bin/e2fsck 失败:没有那个文件或目录

I had the exact same error and all i had to do to fix this is change my android sdk location.我遇到了完全相同的错误,我所要做的就是更改我的 android sdk 位置。 Android studio warned me not to use spaces in folder names, but I still did and that caused this error. Android studio 警告我不要在文件夹名称中使用空格,但我仍然这样做了,这导致了这个错误。

尝试将 VM 堆大小增加到 512 MB,这是所需的最小大小。

对于已经完成这些答案但没有成功的任何人,我会建议重新安装您的模拟器,这在这里有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM