Android模拟器无法在OSX Big Sur上运行 [英] Android emulators are not working on OSX Big Sur

查看:134
本文介绍了Android模拟器无法在OSX Big Sur上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将Mac OS升级到Big Sur,并且没有一个仿真器正在运行.似乎所有Android模拟器在Mac OS Big Sur Beta上均失败.我删除了旧的模拟器,并用不同的硬件/软件创建了新的模拟器,但未成功.在android模拟器中引入了以下问题.

  1. ffffffffb69b4dbb:未处理的1d出口
  2. 仿真器引擎失败
  3. adb设备离线

https://issuetracker.google.com/issues/165038831

有人可以解决吗?

解决方案

更新,2020年1月1日

Android仿真器团队已推送30.1.5,此问题已稳定修复.开发版本30.2.0不包含此修复程序.它应该很快"可用根据Googler在这方面的工作.

另一个注意事项是,如果您在模拟器中遇到的性能不佳,则可能希望尝试使用主机的GPU进行渲染.这可以通过在终端中运行以下命令来实现,其中-avd是仿真器设备的名称,空格变为下划线.

 〜/Library/Android/sdk/emulator/emulator -gpu主机-功能HVF -avd pixel_3a_api_29 

旧信息,出于教育价值而保留:

是对提交的引用为大苏尔解决此问题.看起来它应该在模拟器30.1.5中发布(请参阅日志 https://android.googlesource.com/platform/external/qemu/+log/refs/heads/emu-30-release ),该文件应该在下一个金丝雀版本中./p>

如果您迫不及待,则应该能够建立该分支.经过严格测试的指南从仓库的自述文件中抽出大量精力:

 #获取google repo工具-如果您已经拥有它,则可以跳过卷曲http://commondatastorage.googleapis.com/git-repo-downloads/repo>/usr/local/bin/repo&&chmod + x/usr/local/bin/repo#获取代码,将需要一些时间.如果互联网不佳,最好去这里喝咖啡或在服务器上运行mkdir -p $ HOME/emu-master-dev&&cd $ HOME/emu-master-dev回购init -u https://android.googlesource.com/platform/manifest -b emu-master-dev回购同步-j8#获取XCode 10.1-必填https://download.developer.apple.com/Developer_Tools/Xcode_10.1/Xcode_10.1.xipsudo xcodebuild -license接受&&sudo xcode-select-安装#获取所需的MacOS 10.13 SDK导出XCODE_PATH = $(xcode-select -print-path 2>/dev/null)git clone https://github.com/phracker/MacOSX-SDKscp -r MacOSX-SDKs/MacOSX10.13.sdk/"$ XCODE_PATH/平台/MacOSX.platform/Developer/SDKs"#构建模拟器,这将是另一个休息时间...cd外部/qemu&&android/rebuild.sh# 运行 :)./objs/emulator -list-avds 

I have upgraded the mac OS to Big Sur and none of the emulators are working. It seems that all Android emulators Fails on Mac OS Big Sur Beta. I deleted the old emulators and created new ones with different HW/SW, unsuccessfully. Introduced the following issues in the android emulator.

  1. ffffffffb69b4dbb: unhandled exit 1d
  2. Emulator Engine Failed
  3. adb Device Offline

https://issuetracker.google.com/issues/165038831

Does anyone have a solution?

解决方案

Update, 10-1-2020

The Android Emulator team has pushed 30.1.5 which fixes this issue in stable. The dev build, 30.2.0 does not contain this fix. It should be available "soon" according to the Googler's working on this.

Another note, if you experience poor performance in your emulator you may wish to try using the host's GPU for rendering. This can be accomplished by running the following command in your terminal where -avd is the name of your emulator device with spaces turned to underscores.

~/Library/Android/sdk/emulator/emulator -gpu host -feature HVF -avd pixel_3a_api_29

Old information, kept for educational value:

This is the reference to the commit fixing this issue for Big Sur. This looks like it should be released in the emulator 30.1.5 (see log https://android.googlesource.com/platform/external/qemu/+log/refs/heads/emu-30-release) which should be in the next canary build.

If you can't wait, you should be able to build off that branch. Lightly tested guide heavily pulling from the readme of the repo:

# Get the google repo tool - you can skip if you already have it
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo && chmod +x /usr/local/bin/repo

# Get the code, will take some time. Probably best to go get a coffee here or run on a server if you have poor internet
mkdir -p $HOME/emu-master-dev && cd $HOME/emu-master-dev
repo init -u https://android.googlesource.com/platform/manifest -b emu-master-dev
repo sync -j8

# Get XCode 10.1 - required
https://download.developer.apple.com/Developer_Tools/Xcode_10.1/Xcode_10.1.xip
sudo xcodebuild -license accept &&
sudo xcode-select --install

# Get MacOS 10.13 SDK which is required
export XCODE_PATH=$(xcode-select -print-path 2>/dev/null)
git clone https://github.com/phracker/MacOSX-SDKs
cp -r MacOSX-SDKs/MacOSX10.13.sdk/ "$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs"

# Build the emulator, which will be another coffee break...
cd external/qemu && android/rebuild.sh

# run it :)
./objs/emulator -list-avds

这篇关于Android模拟器无法在OSX Big Sur上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆