场景
-
运行
Android Studio 4.0.4
模拟器时,出现两种失败提示1: -
提示1,不能使用
opengl
,应该是显卡太旧不支持.3:39 PM Executing tasks: [:app:assembleDebug] in project E:\Project\Sample\01.edu-course\Android-Java-1\MyApplication 3:40 PM Emulator: ERROR: WinEngine: Could not open opengl32.dll: %1 不是有效的 Win32 应用程序。 3:40 PM Emulator: Process finished with exit code 1
参考
stackoverflow
的帖子说明[1]The errors you report indicate an incomplete, damaged or faulty driver installation. In short the errors tell, that the emulator is not able to load specific OpenGL functionality, namely functions available only with a proper driver installation. I suggest you try cleansing your system of any graphics drivers, except the standard VGA/VESA driver and do a fresh install with drivers downloaded from the AMD website.
-
提示2,出现运行错误,之后模拟器里的
App
无法启动。
解决方案1
- 两个问题都是同样的处理办法,就是使用
OpenGL ES 2.0
的实现软件模拟硬件支持,在创建虚拟机的时候,虚拟机性能->图形->选择Software - GLES 2.0
来模拟图形卡显示。当然,新电脑或者有独立显卡的一般都不会遇到这个问题。