按下电源按钮时 Android 模拟器 2.0 崩溃

标签 android android-studio android-emulator

我正在使用 android 模拟器 2.0,所有东西都是最新的。设备的详细信息:

Name: Nexus_5X_API_23
CPU/ABI: Google APIs Intel Atom (x86)
Path: /home/khang/.android/avd/Nexus_5X_API_23.avd
Target: google_apis [Google APIs] (API level 23)
Skin: nexus_5x
SD Card: /home/khang/.android/avd/Nexus_5X_API_23.avd/sdcard.img
hw.dPad: no
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: Nexus 5X
vm.heapSize: 100
hw.device.manufacturer: Google
hw.gps: yes
image.androidVersion.api: 23
hw.audioInput: yes
image.sysdir.1: system-images/android-23/google_apis/x86/
tag.id: google_apis
hw.camera.back: emulated
hw.mainKeys: no
AvdId: Nexus_5X_API_23
hw.camera.front: emulated
hw.lcd.density: 420
runtime.scalefactor: auto
avd.ini.displayname: Nexus 5X API 23
hw.gpu.mode: auto
hw.device.hash2: MD5:1be89bc42ec9644d4b77968b23474980
hw.ramSize: 1536
hw.trackBall: no
hw.battery: yes
hw.cpu.ncore: 2
hw.sdCard: yes
tag.display: Google APIs
runtime.network.latency: none
hw.keyboard: yes
hw.sensors.proximity: yes
disk.dataPartition.size: 800M
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes

我尝试测试捕捉锁定/解锁屏幕操作的广播接收器。但我无法在 Emulator 2.0 中模拟它,因为每当我按下电源按钮(或 Ctrl P)时,android 模拟器会自动关闭(无错误消息)。

我认为电源按钮会导致问题,但是当我安装一个可以强制设备休眠(锁定屏幕)的应用程序时,我的 android 模拟器继续关闭,没有任何日志或错误消息。

有人知道这个问题吗?问我是否想了解更多详细信息。

最佳答案

对于您正在运行的设备的 AVD 配置,编辑以下高级设置:

模拟性能::图形:硬件

仿真性能::启动选项:冷启动

仿真性能::多核:4 (我系统上的最大值)

关于按下电源按钮时 Android 模拟器 2.0 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36733287/

相关文章:

android - 我如何将 HTTP 响应从一个 Activity 传递到 android 中的另一个 Activity

android - 执行 com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable 时发生故障

android - 如何在 flutter 项目上手动运行 gradle build

docker - Chrome 浏览器在 Docker 容器中的 Android 模拟器上运行时不断崩溃

android - 尝试运行 C2DM 示例项目

android - 在 android ScrollView 上显示更大的标尺

android - 如何删除 Android Studio 中不需要的工具窗口?

android - 在 Android 上使用 SoundPool 进行无缝循环?

Android Studio什么也不做

android - Gradle 同步失败 : com. android.builder.model.AndroidProject.getProjectType()I