简体   繁体   English

Android:SurfaceView 在我的模拟器中不起作用?

[英]Android : SurfaceView in not working in my Emulator?

I have instantiated a SurfaceView and attached to an activity using setContentView(surface);我已经实例化了一个 SurfaceView 并使用setContentView(surface);附加到一个活动setContentView(surface); . . When I am running it on real devices working fine, but in Android emulator it was showing only white screen.当我在真实设备上运行它时工作正常,但在 Android 模拟器中它只显示白屏。 Also I have tested in different systems, some systems working fine and some are not.我也在不同的系统中进行了测试,有些系统工作正常,有些则没有。

All systems are Ubuntu 16.04, emulators running on same configuration, API level 26. I can say all systems has same development environment.所有系统都是 Ubuntu 16.04,模拟器运行在相同的配置,API 级别 26。我可以说所有系统都有相同的开发环境。

Please help me to find out what would be the cause behind it.请帮我找出它背后的原因。

It seems like the hardware GLES render is responsible for this issue.硬件 GLES 渲染似乎是造成此问题的原因。

You can force software rendering in the AVD device configuration which fixes the issue:您可以在修复问题的 AVD 设备配置中强制软件渲染: 虚拟设备配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM