Flutter 1.9:D / skia(5106):着色器编译错误

问题描述 投票:0回答:1

我使用Android Studio 3.5.1创建了一个简单的Flutter 1.9.1 + hotfix.4应用程序。成功添加新的虚拟设备(Nexus 6)并尝试运行我的应用后,出现此错误:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-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): 

应用程序正常运行,但控制台显示上述错误。

我的配置:

Android Studio 3.5.1

Build#AI-191.8026.42.35.5900203,于2019年9月25日构建

JRE:1.8.0_202-release-1483-b03 amd64

JVM:JetBrains s.r.o的OpenJDK 64位服务器VM

Windows 10 Pro 64位

android android-studio flutter android-emulator
1个回答
0
投票

错误消息来自:Add ShaderErrorHandler to GrContextOptions

在以前的Flutter版本中,永久缓存已被禁用以解决该问题,但是当前在flutter引擎中已启用它:Revert "Disable the persistent cache

解决方案

  • 将您的版本降级为链接的提交或
  • 使用--enable-software-rendering中的标志flutter run
  • 禁用仿真器中的硬件加速。

问题

8578 Shader compilation error

© www.soinside.com 2019 - 2024. All rights reserved.