Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
471 views
in Technique[技术] by (71.8m points)

android - Flutter 1.9: D/skia ( 5106): Shader compilation error

I've created a simple Flutter 1.9.1+hotfix.4 application using Android Studio 3.5.1. After adding successfully a new virtual device (Nexus 6) and tried to run my app, I got this error:

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built buildappoutputsapkdebugapp-debug.apk.
Syncing files to device Android SDK built for x86...
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/EGL_emulation( 5106): eglMakeCurrent: 0xec5ed840: ver 3 1 (tinfo 0xec593810)
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 
D/skia    ( 5106): Shader compilation error
D/skia    ( 5106): ------------------------
D/skia    ( 5106): Errors:
D/skia    ( 5106): 

The application runs correctly but the console shows the errors above.

My Configuration:

Android Studio 3.5.1

Build #AI-191.8026.42.35.5900203, built on September 25, 2019

JRE: 1.8.0_202-release-1483-b03 amd64

JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Windows 10 Pro 64bits

question from:https://stackoverflow.com/questions/58380329/flutter-1-9-d-skia-5106-shader-compilation-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I solved my Shader compilation error by changing emulator's settings.

Press that ... button which is located on the side panel of emulator, and go to Settings section. There, go to Advanced tab and change OpenGL ES API level to Compatibility (OpenGL ES 1.1/2.0).

Do not forget to close and rerun the emulator after this change. On the first run, emulator could pop a warning on its screen and it would take a while to get ready, but do not worry.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...