几天前,当我更新Android Studio时,Android模拟器停止了工作。我试图打开一个空白活动,模拟器也不起作用。
已安装和更新所有SDK工具。当我运行空白活动时,下面是空白活动的事件日志和Logcat(Hello World!)。
Event Log: 1/1/2018 4:43 PM Gradle sync started
4:43 PM Project setup started
4:44 PM Gradle sync finished in 34s 677ms
4:44 PM Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
4:45 PM Gradle build finished in 1m 28s 392ms
5:00 PM Unable to run 'adb': null
5:00 PM 'C:\Media\platform-tools\adb.exe start-server' failed -- run manually if necessary
5:00 PM * daemon not running; starting now at tcp:5037
5:00 PM * daemon started successfully
5:03 PM Executing tasks: [:app:assembleDebug]
5:03 PM Emulator: emulator: ERROR: Missing initial data partition file: C:\Users\Android Studio.android\avd\Nexus_5_API_27.avd/userdata.img
5:03 PM Emulator: compileAndValidateCoreShader: fail to compile. infolog Fragment shader failed to compile with the following errors:
5:03 PM Emulator: ERROR: 0:85: error(#143) Undeclared identifier undefined
5:03 PM Emulator: ERROR: 0:85: error(#132) Syntax error: '<' parse error
5:03 PM Emulator: ERROR: error(#273) 2 compilation errors. No code generated
5:03 PM Emulator:
5:03 PM Emulator: linkAndValidateProgram: fail to link program. infolog: Fragment shader(s) were not successfully compiled before glLinkProgram() was called. Link failed.
5:03 PM Emulator:
Logcat:
01-01 04:05:27.996 3188-3188/com.example.androidstudio.fixit I/zygote: Not late-enabling -Xcheck:jni (already on)
01-01 04:05:28.262 3188-3188/com.example.androidstudio.fixit W/zygote: Unexpected CPU variant for X86 using defaults: x86
01-01 04:05:28.565 3188-3201/com.example.androidstudio.fixit I/zygote: Debugger is no longer active
01-01 04:05:28.915 3188-3188/com.example.androidstudio.fixit I/InstantRun: starting instant run server: is main process
01-01 04:05:29.650 3188-3235/com.example.androidstudio.fixit D/OpenGLRenderer: HWUI GL Pipeline
01-01 04:05:29.872 3188-3235/com.example.androidstudio.fixit I/zygote: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
01-01 04:05:29.872 3188-3235/com.example.androidstudio.fixit I/OpenGLRenderer: Initialized EGL, version 1.4
01-01 04:05:29.872 3188-3235/com.example.androidstudio.fixit D/OpenGLRenderer: Swap behavior 1
01-01 04:05:29.873 3188-3235/com.example.androidstudio.fixit W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
01-01 04:05:29.873 3188-3235/com.example.androidstudio.fixit D/OpenGLRenderer: Swap behavior 0
01-01 04:05:30.001 3188-3235/com.example.androidstudio.fixit D/EGL_emulation: eglCreateContext: 0xa2b59da0: maj 2 min 0 rcv 2
01-01 04:05:30.073 3188-3235/com.example.androidstudio.fixit D/EGL_emulation: eglMakeCurrent: 0xa2b59da0: ver 2 0 (tinfo 0xac24c670)
01-01 04:05:30.269 3188-3235/com.example.androidstudio.fixit D/EGL_emulation: eglMakeCurrent: 0xa2b59da0: ver 2 0 (tinfo 0xac24c670)
答案 0 :(得分:3)
我在模拟器中的Extented Controls中进入了Settings-&gt; Advanced,然后进入Advanced并将OpenGL ES Render更改为SwiftShader,将OpenGL ES API级别更改为兼容性(OpenGL ES 1.1 / 2.0)并显示错误已离开,屏幕现在没有显示白屏,而是显示谷歌地图,这是该程序应该做的。这似乎是一个很好的解决方案吗?我还有更多的事情要做,以免将来搞砸了吗?