Android 应用程序在模拟器上启动但没有响应

Android application starts on emulator but does not respond

昨天和今天一切正常,我的应用程序在模拟器上没有响应!这让我发疯,因为除了更新 Android Studio 之外,我没有做任何不同的事情或做出任何改变,我不知道这是否是原因。该应用程序在模拟器上启动,但它一直闪烁。其他应用程序工作正常。

我的 logcat 输出给了我这个并且不会停止!:

   --------- beginning of system
08-28 14:29:16.772    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:16.772    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa370ae00, error=EGL_SUCCESS
08-28 14:29:16.890    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.009    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.009    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa28cad20, error=EGL_SUCCESS
08-28 14:29:17.233    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.312    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.312    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa29a7b60, error=EGL_SUCCESS
08-28 14:29:17.382    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.529    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.529    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa29a7b40, error=EGL_SUCCESS
08-28 14:29:17.839    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:17.883    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:17.883    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2a98dc0, error=EGL_SUCCESS
08-28 14:29:17.926    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.097    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.097    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2a98da0, error=EGL_SUCCESS
08-28 14:29:18.282    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.339    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.339    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2ba3480, error=EGL_SUCCESS
08-28 14:29:18.539    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.628    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.628    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa327f3a0, error=EGL_SUCCESS
08-28 14:29:18.674    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:18.840    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:18.840    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa327f380, error=EGL_SUCCESS
08-28 14:29:19.136    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:19.195    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:19.195    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa250aa40, error=EGL_SUCCESS
08-28 14:29:19.323    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:19.543    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:19.543    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa25843a0, error=EGL_SUCCESS
08-28 14:29:19.657    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:19.840    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:19.840    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa25f0600, error=EGL_SUCCESS
08-28 14:29:20.047    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:20.191    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:20.191    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2601260, error=EGL_SUCCESS
08-28 14:29:20.398    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:20.461    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:20.461    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa243a740, error=EGL_SUCCESS
08-28 14:29:20.667    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:20.771    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:20.771    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa24477e0, error=EGL_SUCCESS
08-28 14:29:20.979    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.
08-28 14:29:21.072    1997-2013/com.example.lysandroslysandrou.myapplication W/EGL_emulation﹕ eglSurfaceAttrib not implemented
08-28 14:29:21.072    1997-2013/com.example.lysandroslysandrou.myapplication W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa2447720, error=EGL_SUCCESS
08-28 14:29:21.264    1997-1997/com.example.lysandroslysandrou.myapplication I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead.

我的控制台是这样的..:[=​​13=]

emulator: device fd:784
HAXM is working and emulator runs in fast virt mode
emulator: warning: opening audio input failed
creating window 61 83 462 820
emulator: emulator window was out of view and was recentered
draw: Could not use program error=0x505
draw: Could not use program error=0x505
draw: Could not use program error=0x505
draw: Could not use program error=0x505
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not use program error=0x505
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
ColorBuffer::bindFbo: FBO not complete: 0x8cd6
draw: Could not run program: Ü
draw: Could not run program: à
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: ì
draw: Could not run program: î
draw: Could not run program: î
draw: Could not run program: î
draw: Could not run program: ð
draw: Could not run program: ð
ColorBuffer::bindFbo: FBO not complete: 0
draw: Could not run program: ò

这些输出不会停止!!请任何帮助将不胜感激.. 如果还需要什么,请告诉我!!

我没有 "solve" 问题的解决方案,但是如果您通过创建一个新的 AVD 绕过它并将其用作默认模拟器怎么办?

我自己发现模拟器非常无用。使用真正的 android 设备,然后您就可以确定它是否有效。

尝试创建另一个虚拟机。 检查 gradle 版本。 重新安装 api 个软件包。

为了将来参考,我已经通过返回到我的应用程序的旧版本并从那里重新开始来解决了我的问题。无论我做了多少研究,我都没有找到直接的解决方案。显然这与 OpenGLRenderer 有关,但我不确定是哪种方式。

我能给出的最佳建议是在不同阶段不断复制您的应用程序,以防发生此类情况。此外,请始终确保在更新 Android Studio 之前保存您的文件,因为它可能会把事情搞砸,并且在您更新项目的哪个阶段要小心。