Android模拟器卡在黑屏上 [英] Android Emulator Stuck With Black Screen

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

问题描述

我刚接触Android开发,并运行默认的空白项目.我有Android Studio 2.1.2. 问题是,尽管HAXM运作良好,但仿真器仍卡在黑屏上: "HAX正在运行,并且仿真器以快速virt模式运行" 大多数解决方案建议在AVD Manager中取消选中使用主机gpu",但似乎该功能不再出现在新版本的Android Studio中. 我运行macOS El Capitan.

I'm just new with Android Development, and running the default blank project. I have Android Studio 2.1.2. The problem is the emulator stuck with the black screen although HAXM works well: "HAX is working and emulator runs in fast virt mode" Most solutions suggest to uncheck "use host gpu" in AVD Manager, yet it seems this feature no longer appear in the new version of Android Studio. I run macOS El Capitan.

推荐答案

这个周末更新了Android Studio后(也许是Gradle?),当我运行已安装的应用APK时,AVD模拟器(Mac)突然开始显示黑屏.有时它显示蓝屏.有时,仿真器甚至会显示一个已安装的应用程序图标页面.有时会倒挂.有时会倒挂并扭转!闻起来像是图形问题.

After an update to Android Studio this weekend (maybe Gradle?), the AVD emulator (Mac) suddenly started showing a black screen when I ran my installed app APK. Sometimes it showed a blue screen. Sometimes the emulator even showed a page of installed app icons. Sometimes upside down. Sometimes upside down and reversed! That smelled like a graphics problem.

由于我的应用程序中有音频,所以我意识到我仍然可以通过单击黑屏的特定位置来激活应用程序中的按钮.绝对是图形问题.

Thanks to audio in my app, I realized I could still activate buttons in my app by clicking on a specific location of the black screen. Definitely a graphics problem.

根据我读到的其他想法,我在仿真性能"部分中编辑了我的AVD设备配置,以将图形"从自动"更改为软件-GLES 2.0" .

Based on other ideas that I read, I edited my AVD device config in the Emulated Performance section, to change Graphics from "Automatic" to "Software - GLES 2.0".

它对我来说适用于API 25上的Nexus 9和Pixel XL模拟器.

It worked for me on the emulators for Nexus 9 and Pixel XL on API 25.

由于无法更改图形"设置,因此该解决方案不能不能在启用了Play商店的设备上运行.例如Nexus 5X API25.

This solution does not work on Play Store-enabled devices because the Graphics setting can't be changed. For example the Nexus 5X API 25.

环境:Android Studio 3.0.1,Gradle 4.1

Environment: Android Studio 3.0.1, Gradle 4.1

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

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