Android 模拟器无法在 MAC 上运行

2024-04-27

下载 Android Studio 后,我一直在尝试使用 Android 模拟器。我以前使用过旧的三星 S4,但需要与 Marshmallow 兼容的设备才能实现某些功能。

我看到的问题是:

  • - 模拟器不运行
  • -Android 屏幕显示好像正在准备启动,但实际上并未启动
  • - 当 Android 屏幕在等待一小时后消失时,屏幕会显示对话框,提示系统无响应,并等待或终止该应用程序 过程
  • - 当我尝试在 AVD 上运行应用程序时,同时显示该屏幕,Android Studio 会弹出错误,提示 AVD 未安装 APK 正确地卸载它们或取消。

我尝试过的解决方案:

  • -将 AVD RAM 降低至 512 和 236 MB
  • - 关闭模拟器摄像头
  • - 关闭音频
  • - 软件的图形首选项设置
  • - 删除并重新下载所有内容
  • - 检查以确保 API 与 SDK 匹配
  • -尝试不同的API (25)
  • -下载BlueStacks(没有意识到它使用Kitkat)

大多数针对缓慢/无法工作的模拟器的解决方案都与我更改和尝试的模拟器设置有关。我已经被这个问题困扰了三天,非常渴望找到一个解决方案,这样我就可以测试我的应用程序,它需要 Android API 23 以上。

一个小旁注,以防万一我运气不好。我使用的是 2010 年中期的 MAC,运行 OSX Sierra、Core 2 双核处理器、16GB RAM、1TB 硬盘。

**更新 我已经通过命令行运行了模拟器,这是我收到的输出。模拟器仍在 Android 屏幕上加载,但在“Adb 连接,开始代理数据”后的最后 30 分钟内没有记录更多输出。

Macs-MacBook-Pro-2:sdk joncorrin$ tools/emulator @Nexus_5X_API_23 -verbose
emulator:Android emulator version 25.3.0.0 (build_id 3394391)
emulator:Found AVD name 'Nexus_5X_API_23'
emulator:Found AVD target architecture: x86
emulator:argv[0]: 'tools/emulator'; program directory: '/Users/mac/Library/Android/sdk/tools'
emulator:  Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/

emulator:Probing for /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86//kernel-ranchu: file exists
emulator:Auto-config: -engine qemu2 (based on configuration)
emulator:  Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/

emulator:try dir /Users/mac/Library/Android/sdk/tools
emulator:try dir tools/
emulator:try dir emulator
emulator:Found target-specific 64-bit emulator binary: emulator/qemu/darwin-x86_64/qemu-system-i386
emulator:Adding library search path: 'emulator/lib64'
emulator:  Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/

emulator:  Found directory: /Users/mac/Library/Android/sdk/system-images/android-23/google_apis/x86/

emulator:GPU emulation is disabled
emulator: Adding library search path for Qt: 'emulator/lib64/qt/lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=emulator/lib64/qt/plugins
emulator: Running :emulator/qemu/darwin-x86_64/qemu-system-i386
emulator: qemu backend: argv[00] = "emulator/qemu/darwin-x86_64/qemu-system-i386"
emulator: qemu backend: argv[01] = "@Nexus_5X_API_23"
emulator: qemu backend: argv[02] = "-verbose"
emulator: Concatenated backend parameters:
 emulator/qemu/darwin-x86_64/qemu-system-i386 @Nexus_5X_API_23 -verbose
emulator: WARNING: Crash service did not start

emulator: Android virtual device file at: /Users/mac/.android/avd/Nexus_5X_API_23.ini
emulator: virtual device content at /Users/mac/.android/avd/Nexus_5X_API_23.avd
emulator: virtual device config file: /Users/mac/.android/avd/Nexus_5X_API_23.avd/config.ini
emulator: using core hw config path: /Users/mac/.android/avd/Nexus_5X_API_23.avd/hardware-qemu.ini
emulator: Found AVD target API level: 23
emulator: Read property file at ./system-images/android-23/google_apis/x86//build.prop
emulator: No boot.prop property file found.
emulator: found skin 'nexus_5x' in directory: /Users/mac/Library/Android/sdk/skins/
emulator: autoconfig: -skin nexus_5x
emulator: autoconfig: -skindir /Users/mac/Library/Android/sdk/skins/
emulator: autoconfig: -kernel ./system-images/android-23/google_apis/x86//kernel-ranchu
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk ./system-images/android-23/google_apis/x86//ramdisk.img
emulator: Using initial system image: ./system-images/android-23/google_apis/x86//system.img
emulator: autoconfig: -data /Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img
emulator: autoconfig: -initdata /Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata.img
emulator: autoconfig: -cache /Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img
emulator: autoconfig: -sdcard /Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img
emulator: Increasing RAM size to 1024MB
emulator: System image is read only
emulator: GPU emulation is disabled
emulator: Found 2 DNS servers: 75.75.75.75 75.75.76.76
emulator: trying to load skin file '/Users/mac/Library/Android/sdk/skins//nexus_5x/layout'
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 6.0.5 (3) is installed and usable.
emulator: Adjusting Contiguous Memory Allocation of 1080x1920 framebuffer for software renderer to 16MB.
emulator: Found 2 DNS servers: 75.75.75.75 75.75.76.76
Content of hardware configuration file:
  hw.cpu.arch = x86
  hw.cpu.model = qemu32
  hw.cpu.ncore = 1
  hw.ramSize = 1024
  hw.screen = multi-touch
  hw.mainKeys = false
  hw.trackBall = false
  hw.keyboard = true
  hw.keyboard.lid = false
  hw.keyboard.charmap = qwerty2
  hw.dPad = false
  hw.gsmModem = true
  hw.gps = true
  hw.battery = true
  hw.accelerometer = true
  hw.audioInput = true
  hw.audioOutput = true
  hw.sdCard = true
  hw.sdCard.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img
  disk.cachePartition = true
  disk.cachePartition.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img
  disk.cachePartition.size = 66m
  hw.lcd.width = 1080
  hw.lcd.height = 1920
  hw.lcd.depth = 16
  hw.lcd.density = 420
  hw.lcd.backlight = true
  hw.gpu.enabled = false
  hw.gpu.mode = guest
  hw.gpu.blacklisted = no
  hw.initialOrientation = Portrait
  hw.camera.back = emulated
  hw.camera.front = emulated
  vm.heapSize = 256
  hw.sensors.light = true
  hw.sensors.pressure = true
  hw.sensors.humidity = true
  hw.sensors.proximity = true
  hw.sensors.magnetic_field = true
  hw.sensors.orientation = true
  hw.sensors.temperature = true
  hw.useext4 = true
  kernel.path = ./system-images/android-23/google_apis/x86//kernel-ranchu
  kernel.newDeviceNaming = yes
  kernel.supportsYaffs2 = no
  disk.ramdisk.path = ./system-images/android-23/google_apis/x86//ramdisk.img
  disk.systemPartition.initPath = ./system-images/android-23/google_apis/x86//system.img
  disk.systemPartition.size = 1280m
  disk.dataPartition.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img
  disk.dataPartition.size = 2g
  disk.encryptionKeyPartition.path = /Users/mac/.android/avd/Nexus_5X_API_23.avd/encryptionkey.img
  avd.name = Nexus_5X_API_23
.
QEMU options list:
emulator: argv[00] = "emulator/qemu/darwin-x86_64/qemu-system-i386"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "75.75.75.75,75.75.76.76"
emulator: argv[03] = "-serial"
emulator: argv[04] = "null"
emulator: argv[05] = "-cpu"
emulator: argv[06] = "android32"
emulator: argv[07] = "-enable-hax"
emulator: argv[08] = "-m"
emulator: argv[09] = "1024"
emulator: argv[10] = "-lcd-density"
emulator: argv[11] = "420"
emulator: argv[12] = "-kernel"
emulator: argv[13] = "./system-images/android-23/google_apis/x86//kernel-ranchu"
emulator: argv[14] = "-initrd"
emulator: argv[15] = "./system-images/android-23/google_apis/x86//ramdisk.img"
emulator: argv[16] = "-object"
emulator: argv[17] = "iothread,id=disk-iothread"
emulator: argv[18] = "-drive"
emulator: argv[19] = "if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/system.img.qcow2,read-only"
emulator: argv[20] = "-device"
emulator: argv[21] = "virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify"
emulator: argv[22] = "-drive"
emulator: argv[23] = "if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img.qcow2,l2-cache-size=1048576"
emulator: argv[24] = "-device"
emulator: argv[25] = "virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify"
emulator: argv[26] = "-drive"
emulator: argv[27] = "if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img.qcow2,l2-cache-size=1048576"
emulator: argv[28] = "-device"
emulator: argv[29] = "virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify"
emulator: argv[30] = "-drive"
emulator: argv[31] = "if=none,overlap-check=none,cache=unsafe,index=3,id=encrypt,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/encryptionkey.img.qcow2,l2-cache-size=1048576"
emulator: argv[32] = "-device"
emulator: argv[33] = "virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify"
emulator: argv[34] = "-drive"
emulator: argv[35] = "if=none,overlap-check=none,cache=unsafe,index=4,id=sdcard,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img.qcow2,l2-cache-size=1048576"
emulator: argv[36] = "-device"
emulator: argv[37] = "virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify"
emulator: argv[38] = "-netdev"
emulator: argv[39] = "user,id=mynet"
emulator: argv[40] = "-device"
emulator: argv[41] = "virtio-net-pci,netdev=mynet"
emulator: argv[42] = "-netdev"
emulator: argv[43] = "user,id=mynet2,net=10.0.3.0/24"
emulator: argv[44] = "-device"
emulator: argv[45] = "virtio-net-pci,netdev=mynet2"
emulator: argv[46] = "-show-cursor"
emulator: argv[47] = "-L"
emulator: argv[48] = "emulator/lib/pc-bios"
emulator: argv[49] = "-soundhw"
emulator: argv[50] = "hda"
emulator: argv[51] = "-vga"
emulator: argv[52] = "none"
emulator: argv[53] = "-append"
emulator: argv[54] = "qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=2 qemu.encrypt=1 cma=32M ndns=2"
emulator: argv[55] = "-android-hw"
emulator: argv[56] = "/Users/mac/.android/avd/Nexus_5X_API_23.avd/hardware-qemu.ini"
Concatenated QEMU options:
 emulator/qemu/darwin-x86_64/qemu-system-i386 -dns-server 75.75.75.75,75.75.76.76 -serial null -cpu android32 -enable-hax -m 1024 -lcd-density 420 -kernel ./system-images/android-23/google_apis/x86//kernel-ranchu -initrd ./system-images/android-23/google_apis/x86//ramdisk.img -object iothread,id=disk-iothread -drive if=none,overlap-check=none,cache=unsafe,index=0,id=system,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/system.img.qcow2,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=1,id=cache,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/cache.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=2,id=userdata,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/userdata-qemu.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=3,id=encrypt,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/encryptionkey.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify -drive if=none,overlap-check=none,cache=unsafe,index=4,id=sdcard,file=/Users/mac/.android/avd/Nexus_5X_API_23.avd/sdcard.img.qcow2,l2-cache-size=1048576 -device virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -netdev user,id=mynet2,net=10.0.3.0/24 -device virtio-net-pci,netdev=mynet2 -show-cursor -L emulator/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 androidboot.hardware=ranchu clocksource=pit android.qemud=1 console=0 console=0 android.checkjni=1 qemu.gles=2 qemu.encrypt=1 cma=32M ndns=2' -android-hw /Users/mac/.android/avd/Nexus_5X_API_23.avd/hardware-qemu.ini
emulator: Starting QEMU main loop
Hax is enabled
Hax ram_size 0x40000000
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'both'
emulator: Adding boot property: 'ro.opengles.version' = '131072'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '256m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.adb.secure' = '1'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '420'
HAX is working and emulator runs in fast virt mode.
emulator: goldfish_events.have-dpad: false
emulator: goldfish_events.have-trackball: false
emulator: goldfish_events.have-camera: true
emulator: goldfish_events.have-keyboard: true
emulator: goldfish_events.have-lidswitch: false
emulator: goldfish_events.have-touch: false
emulator: goldfish_events.have-multitouch: true
emulator: control console listening on port 5554, ADB on port 5555
Not using any http proxy
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized

emulator: onGuestSendCommand: [0x7f80950cdc00] Adb connected, start proxing data

**更新

输出记录:

emulator: _hwFingerprint_connect: connect finger print listen is called

  emulator: got message from guest system fingerprint HAL

在最后30分钟内。

Android 显示滞后屏幕,显示“正在启动 Android 进程”,然后 30 分钟后显示冻结屏幕,显示系统 UI 没有响应,后面有一个允许调试对话框。查看图片。当我单击时,用户界面没有响应,日志也没有输出我发布的内容之外的任何内容。


这对我有用

  1. 删除您当前拥有的所有 AVD。
  2. 转到首选项 >> Android SDK >> SDK 工具
  3. 卸载安卓模拟器
  4. 重新启动 Android Studio。
  5. 从同一位置重新安装 Android 模拟器。
  6. 创建一个新的模拟器! 希望这可以帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Android 模拟器无法在 MAC 上运行 的相关文章

随机推荐

  • 在 Neo4j 中可视化连接的组件

    我可以使用下面的代码找到图中最密集连接的组件 CALL algo unionFind stream pnHours YIELD nodeId setId groupBy setId storing all node ids of the s
  • 如何同时(并行)调用远程计算机上的相同功能

    我正在编写一个脚本 该脚本具有多个需要时间在不同远程计算机上执行的函数 有什么方法可以以并行方式同时调用命令它们吗 举个例子将不胜感激 谢谢 Invoke Command已经对每台计算机并行执行调用 作为内置功能的一部分 https tec
  • 如何从 AngularJS 中的自定义指令 * 具有自己的作用域 * 访问父作用域?

    我正在寻找访问指令中 父 范围的任何方式 范围 嵌入 要求 从上面传入变量 或范围本身 等的任何组合 我完全愿意竭尽全力 但我想避免一些完全hacky或无法维护的东西 例如 我知道我现在可以通过采取 scope从 preLink 参数并迭代
  • 如何通过guard angular2隐藏链接

    如何在视图 html 中隐藏管理链接 我必须守护 管理员和经理 路由器配置 path manager component ManagerComponent canActivate ManagerGuard path user compone
  • Jenkins 在解析 pom 时失败

    我的 Jenkins 服务器上的一项作业出现问题 在 pom 解析期间失败并显示以下消息 Parsing POMs Modules changed recalculating dependency graph workspace java
  • 水平计数加工织物中的白色簇

    我对织物材质进行了处理 得到如下图所示的图像 原图 处理后的图像 现在 我想找到连续的白色簇的数量 如果所有簇都是均匀且完全水平的 我将运行一个循环来计算强度的上升和下降 以找到簇的数量 但事实并非如此 如果我通过上述方法取几行的中值 平均
  • 如何合并 jQuery 数据表 excelHtml5 中列的匹配值

    当我从数据表导出 Excel 时 我无法合并 col 值 由于列的值B named Category 需要合并重复值 我是编程新手 感谢任何帮助 这是我的我的jsfiddle https jsfiddle net t1j6rzg8 2 这是
  • Drupal - 使用引导程序检查 Drupal 之外的登录用户不起作用

    我正在绞尽脑汁地想弄清楚这个问题 在 Drupal 目录之外时 我无法让 Bootstrap 正常工作 如果我在 Drupal 目录中运行此代码 它可以正常工作 但向上一级不起作用 我的 Drupal 路径是 public html dru
  • 博耶摩尔算法的实现?

    有 C 语言的 Boyer Moore 字符串搜索算法的工作示例吗 我浏览了一些网站 但它们似乎有很多问题 包括维基百科 Thanks 子字符串搜索算法的最佳网站 http igm univ mlv fr lecroq string htt
  • 为什么不能使用与数组声明分开的数组初始化语法?

    我可以用一个整数来做到这一点 int a a 5 但我不能用整数数组来做到这一点 int a a 1 2 3 4 5 Why not 澄清 我不是在寻找正确的语法 我可以查找 我知道这有效 int a 1 2 3 4 5 这相当于 int
  • 即使没有任何更改,Makefile 也始终不是最新的

    我有一个包含两个文件夹的目录 src and binmakefile 位于根目录 即使没有更改 此 makefile 也会持续编译 不是最新的 我在这个 makefile 中遗漏了什么吗 all make a b a src a cpp g
  • Xcode:“此时无法安装此应用程序。”

    使用我的第一个应用程序进行学习 一切顺利 但 Xcode 遇到了问题 当我尝试在 iPhone 模拟器上运行该应用程序时 总是弹出此消息 此时无法安装此应用程序 怎么了 尝试构建应用程序时没有错误 已尝试清理构建 重新安装 Pod 重新启动
  • Team City 构建失败不返回失败代码

    我有一个在 TeamCity 上运行 Invoke MsBuild 的 powershell 脚本 在构建过程中 我看到其中一个项目出现 警告 构建失败 然而 teamcity 最后表示构建成功 如何强制 TC 退出并显示错误代码或至少报告
  • 如何在 rspec 请求规范中设置请求标头?

    在控制器规范中 我可以像这样设置 http 接受标头 request accept application json 但在请求规范中 请求 对象为零 那么我在这里该怎么做呢 我想将 http 接受标头设置为 json 的原因是这样我可以这样
  • corona sdk中拖动物理对象

    我尝试在场景中拖动重力 0 0 的动态主体 我有一个主体类型为动态的正方形 以及一个主体类型为静态的图像 但是当将方形拖动到图像上时 它会产生一点力 但是可以超出图像并传递到另一边 如图所示 这是我拖动正方形的代码 local functi
  • 如何使用Intent限制录音时间?

    使用意图时如何限制录制 我尝试了这段代码 Intent intent new Intent MediaStore ACTION VIDEO CAPTURE intent putExtra android intent extra durat
  • Web 服务 Android 应用程序:无法序列化 1.0

    P S 我看过类似的问题 但无法理解该怎么做 他们谈论使用元帅类 我似乎无法理解 我正在创建一个安卓应用 to 使用 JAX WS 我正在使用ksoap 2图书馆同样如此 我在一系列文本字段中获取用户的输入 并将这些输入传递到 WebSer
  • 将自定义标头值传递给 IdentityServer4 Login

    当用户尝试登录时 我尝试将自定义标头值 无 cookie 传递给 IdentityServer4 这是所有设置的方式 自定义身份验证属性 AttributeUsage AttributeTargets Class AttributeTarg
  • 根据 Excel 模板修改 Outlook 电子邮件的 HTMLBody

    我正在尝试根据模板从 Excel VBA 修改 Outlook 电子邮件的 HTML 正文 我的代码是 Sub Email Button Dim OutApp As Outlook Application Dim OutMail As Ou
  • Android 模拟器无法在 MAC 上运行

    下载 Android Studio 后 我一直在尝试使用 Android 模拟器 我以前使用过旧的三星 S4 但需要与 Marshmallow 兼容的设备才能实现某些功能 我看到的问题是 模拟器不运行 Android 屏幕显示好像正在准备启