AVD 模拟器被杀死 - Mac
AVD emulator killed - Mac
我花了一整天的时间尝试在 Whosebug 上的多个问题中找到的所有方法和数十个 google 结果(简短摘要):
- 重启电脑
- 删除并重新创建 AVD
- 将 AVD 图形更改为软件(在 AVD 管理器中和直接在文件中)
- 在 SDK 管理器中重新安装模拟器(所有 pos 可行的方法 - 更新、删除和重新安装,启动 AVD 时按需重新安装)
- 重新安装 HAXM
- 重新安装Android工作室
- 在 SDK 管理器中检查所有 Android 版本
- 从命令行启动AVD(此方法对本post很重要)
- 可能还有更多
- ...这一切都以不同的顺序和组合多次
然后我在 youtube 上的 (this) 视频下找到了这个评论回复:
I managed to fix the issue after looking for it for 5 hours.
There is no error message when I tried to run from the android studio.
However, running the emulator the terminal will print the error message and this will help a lot.
Run from terminal:
/Users/hendrysetiadi/Library/Android/sdk/emulator/emulator emulator -avd Pixel_4_API_29
My error message is like below:
emulator: Android emulator version 30.5.0.0 (build_id 7145572) (CL:N/A)
dyld: Library not loaded: /System/Library/Frameworks/IOUSBHost.framework/Versions/A/IOUSBHost
Referenced from: /Users/hendrysetiadi/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
Reason: image not found
Abort trap: 6
I managed to get the IOUSBHost.framework from my friend laptop and then upload it to google drive (in zip format)
I follow the steps in here
https://apple.stackexchange.com/questions/300222/accidentally-deleted-a-system-framework-macos-screwed
The steps are
- restart mac and command+R to show recovery option, choose safari icon to launch safari in recovery mode
- In safari, open the google drive link I have uploaded earlier, then download the zip file directly into /System/Library/Frameworks/ (it will automatically unzip)
- restart the laptop.
- Done
这与我使用命令行方法遇到的错误完全相同。
问题是,我确实可以访问另一台计算机 运行 OSX - 就我而言是 Mojave。但是我不知道 os 版本是否那么重要。
我的问题是:“是否有人能够并愿意提供 IOUSBHost.framework 中的文件 /System/Library/Frameworks/ 来自 OSX(最好是莫哈韦沙漠),然后 post link 在这里?”最好是 zip 格式,但我可以自己管理。
我会立即测试该方法,如果可行,我将自己 host 文件(以保持可用性并释放 poster 的资源)并创建解决方案在这里回答。
谢谢
我遇到了和你一样的错误。提议的解决方案没有任何效果。我已经尝试过你所做的一切。
到目前为止,似乎唯一的解决方案是将我们的 Mac 至少升级到 Catalina...或者降级所有...这似乎不是最简单的方法。
In macOS 10.15 Catalina, Apple has introduced a new framework to
access USB devices in user mode, the IOUSBHost framework.
您可以在这里阅读更多内容:
- https://tejusadiga.wordpress.com/2020/06/06/time-to-farewell-kernel-extensions-kext-on-macos/
- https://developer.apple.com/documentation/iousbhost
希望这也能给你带来一些启发;)
编辑:
更新到 Android Emulator 30.5.4.0 后不再需要该框架。 Google 可能已经解决了这个问题。
经过进一步研究并感谢此处的评论,尤其是 Don Pato 的回答,很明显在 Android 模拟器更新到版本 30.5.3.0 后,它开始在 [=76 上显示给定错误=]X Mojave 及更早版本,因为缺少框架。
对于这种情况有 2 个明显的解决方案 + 这个:
- 更新OS
- 降级 Android 模拟器(连同 Android studio 本身)
- 这个解决方案
由于某些其他软件兼容性,第一个解决方案可能无法实现,第二个可能不切实际,因为较旧的模拟器能够 运行 Android API 最大 29
感谢提到的Youtube评论的原作者(Hendry Setiadi)提供了所需的文件(他是这里的英雄),问题可以解决,避免了之前的2个选项。我不得不稍微改变他的步骤,因为由于“磁盘不足 space”错误,我无法在恢复模式下直接在 Safari 中下载文件。
求解过程:
- 从以下 link 下载缺少的框架:https://www.dropbox.com/s/i9bzzw5sr0s7e81/IOUSBHost.framework.zip?dl=0
- Unizp
- 现在需要coget文件IOUSBHost.framework到/System/Library/Frameworks是系统只读的目录。谁知道怎么做,可以停止阅读并直接去做。我是按照以下步骤完成的 - 其中一些可能是不必要的。
- 使用 Cmd+R 重新启动恢复,并在实用程序中启动终端以使用
csrutil disable
禁用系统完整性保护
- 重启系统并通过输入终端挂载可写系统
sudo mount -uw /
- 现在您可以复制文件了 - 我是在 Finder 中复制的(mac 需要用户密码)
- 不要忘记在
csrutil enable
恢复时再次打开 SIP
开始您的 AVD!
Google 正在处理这个错误。下一版本的模拟器将不再依赖该框架。此处提供 36 的测试版:
我正在使用 High Sierra OSx 10.13.6.
自从模拟器升级到 3.5.3.0 后,我在命令行中收到相同的错误消息
~/Library/Android/sdk/emulator/emulator -avd Pixel_XL_API_30
模拟器:Android 模拟器版本 30.5.3.0 (build_id 7196367) (CL:N/A)
dyld:库未加载:/System/Library/Frameworks/IOUSBHost.framework/Versions/A/IOUSBHost
引用自:/Users/user/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64
原因:找不到图片
中止陷阱:6
将尝试下载给定的 zip 文件并尝试修复。谢谢杰夫
我也遇到过这个问题。将我的 Android Studio 更新为 4.1.3
后,模拟器停止 运行。
我尽一切可能解决这个问题。发现对于少数人来说,将他们的 MacOS 升级到 big sur 修复了它。我下载了 big-sur
,但在安装时,它要求从设备释放 25GB,这是不可能的,因此也无法安装 big-sur。
最终,在更新到 Android Emulator 30.5.4.0
后,它解决了这个问题。不需要做任何其他事情。似乎 google 已在最新的 Android 模拟器版本中修复它。
我花了一整天的时间尝试在 Whosebug 上的多个问题中找到的所有方法和数十个 google 结果(简短摘要):
- 重启电脑
- 删除并重新创建 AVD
- 将 AVD 图形更改为软件(在 AVD 管理器中和直接在文件中)
- 在 SDK 管理器中重新安装模拟器(所有 pos 可行的方法 - 更新、删除和重新安装,启动 AVD 时按需重新安装)
- 重新安装 HAXM
- 重新安装Android工作室
- 在 SDK 管理器中检查所有 Android 版本
- 从命令行启动AVD(此方法对本post很重要)
- 可能还有更多
- ...这一切都以不同的顺序和组合多次
然后我在 youtube 上的 (this) 视频下找到了这个评论回复:
I managed to fix the issue after looking for it for 5 hours. There is no error message when I tried to run from the android studio. However, running the emulator the terminal will print the error message and this will help a lot. Run from terminal: /Users/hendrysetiadi/Library/Android/sdk/emulator/emulator emulator -avd Pixel_4_API_29 My error message is like below: emulator: Android emulator version 30.5.0.0 (build_id 7145572) (CL:N/A) dyld: Library not loaded: /System/Library/Frameworks/IOUSBHost.framework/Versions/A/IOUSBHost Referenced from: /Users/hendrysetiadi/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 Reason: image not found Abort trap: 6 I managed to get the IOUSBHost.framework from my friend laptop and then upload it to google drive (in zip format) I follow the steps in here https://apple.stackexchange.com/questions/300222/accidentally-deleted-a-system-framework-macos-screwed The steps are - restart mac and command+R to show recovery option, choose safari icon to launch safari in recovery mode - In safari, open the google drive link I have uploaded earlier, then download the zip file directly into /System/Library/Frameworks/ (it will automatically unzip) - restart the laptop. - Done
这与我使用命令行方法遇到的错误完全相同。
问题是,我确实可以访问另一台计算机 运行 OSX - 就我而言是 Mojave。但是我不知道 os 版本是否那么重要。
我的问题是:“是否有人能够并愿意提供 IOUSBHost.framework 中的文件 /System/Library/Frameworks/ 来自 OSX(最好是莫哈韦沙漠),然后 post link 在这里?”最好是 zip 格式,但我可以自己管理。
我会立即测试该方法,如果可行,我将自己 host 文件(以保持可用性并释放 poster 的资源)并创建解决方案在这里回答。
谢谢
我遇到了和你一样的错误。提议的解决方案没有任何效果。我已经尝试过你所做的一切。 到目前为止,似乎唯一的解决方案是将我们的 Mac 至少升级到 Catalina...或者降级所有...这似乎不是最简单的方法。
In macOS 10.15 Catalina, Apple has introduced a new framework to access USB devices in user mode, the IOUSBHost framework.
您可以在这里阅读更多内容:
- https://tejusadiga.wordpress.com/2020/06/06/time-to-farewell-kernel-extensions-kext-on-macos/
- https://developer.apple.com/documentation/iousbhost
希望这也能给你带来一些启发;)
编辑:
更新到 Android Emulator 30.5.4.0 后不再需要该框架。 Google 可能已经解决了这个问题。
经过进一步研究并感谢此处的评论,尤其是 Don Pato 的回答,很明显在 Android 模拟器更新到版本 30.5.3.0 后,它开始在 [=76 上显示给定错误=]X Mojave 及更早版本,因为缺少框架。
对于这种情况有 2 个明显的解决方案 + 这个:
- 更新OS
- 降级 Android 模拟器(连同 Android studio 本身)
- 这个解决方案
由于某些其他软件兼容性,第一个解决方案可能无法实现,第二个可能不切实际,因为较旧的模拟器能够 运行 Android API 最大 29
感谢提到的Youtube评论的原作者(Hendry Setiadi)提供了所需的文件(他是这里的英雄),问题可以解决,避免了之前的2个选项。我不得不稍微改变他的步骤,因为由于“磁盘不足 space”错误,我无法在恢复模式下直接在 Safari 中下载文件。
求解过程:
- 从以下 link 下载缺少的框架:https://www.dropbox.com/s/i9bzzw5sr0s7e81/IOUSBHost.framework.zip?dl=0
- Unizp
- 现在需要coget文件IOUSBHost.framework到/System/Library/Frameworks是系统只读的目录。谁知道怎么做,可以停止阅读并直接去做。我是按照以下步骤完成的 - 其中一些可能是不必要的。
- 使用 Cmd+R 重新启动恢复,并在实用程序中启动终端以使用
csrutil disable
禁用系统完整性保护
- 重启系统并通过输入终端挂载可写系统
sudo mount -uw /
- 现在您可以复制文件了 - 我是在 Finder 中复制的(mac 需要用户密码)
- 不要忘记在
csrutil enable
恢复时再次打开 SIP
开始您的 AVD!
Google 正在处理这个错误。下一版本的模拟器将不再依赖该框架。此处提供 36 的测试版:
我正在使用 High Sierra OSx 10.13.6.
自从模拟器升级到 3.5.3.0 后,我在命令行中收到相同的错误消息
~/Library/Android/sdk/emulator/emulator -avd Pixel_XL_API_30 模拟器:Android 模拟器版本 30.5.3.0 (build_id 7196367) (CL:N/A) dyld:库未加载:/System/Library/Frameworks/IOUSBHost.framework/Versions/A/IOUSBHost 引用自:/Users/user/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 原因:找不到图片 中止陷阱:6
将尝试下载给定的 zip 文件并尝试修复。谢谢杰夫
我也遇到过这个问题。将我的 Android Studio 更新为 4.1.3
后,模拟器停止 运行。
我尽一切可能解决这个问题。发现对于少数人来说,将他们的 MacOS 升级到 big sur 修复了它。我下载了 big-sur
,但在安装时,它要求从设备释放 25GB,这是不可能的,因此也无法安装 big-sur。
最终,在更新到 Android Emulator 30.5.4.0
后,它解决了这个问题。不需要做任何其他事情。似乎 google 已在最新的 Android 模拟器版本中修复它。