window下安装flutter,连接蓝叠模拟器遇到的问题及解决办法

window下安装flutter,连接蓝叠模拟器遇到的问题及解决办法_第1张图片

在学习使用Flutter做Android开发的时候,涉及到演示,这里为了方便,使用蓝蝶模拟器做安卓虚拟机,在flutter run 的时候遇到了如下问题

D:\test\Android\flutter_app>flutter run -d all
Launching lib/main.dart on GT I9500 in debug mode...
Initializing gradle...                                       1.6s
Resolving dependencies...                                    7.4s
Gradle task 'assembleDebug'...
Gradle task 'assembleDebug'... Done                         12.2s
Built build\app\outputs\apk\debug\app-debug.apk.
E/flutter ( 6146): [ERROR:flutter/shell/platform/android/android_context_gl.cc(165)] Could not choose an EGL configuration.
E/flutter ( 6146): [ERROR:flutter/shell/platform/android/android_context_gl.cc(53)] EGL Error: EGL_SUCCESS (12288)
F/flutter ( 6146): [FATAL:flutter/shell/platform/android/platform_view_android.cc(28)] Check failed: android_surface_. Could not create an OpenGL, Vulkan or Software surface to setup rendering.
E/flutter ( 6173): [ERROR:flutter/shell/platform/android/android_context_gl.cc(165)] Could not choose an EGL configuration.
E/flutter ( 6173): [ERROR:flutter/shell/platform/android/android_context_gl.cc(53)] EGL Error: EGL_SUCCESS (12288)
F/flutter ( 6173): [FATAL:flutter/shell/platform/android/platform_view_android.cc(28)] Check failed: android_surface_. Could not create an OpenGL, Vulkan or Software surface to setup rendering.
E/flutter ( 6207): [ERROR:flutter/shell/platform/android/android_context_gl.cc(165)] Could not choose an EGL configuration.
E/flutter ( 6207): [ERROR:flutter/shell/platform/android/android_context_gl.cc(53)] EGL Error: EGL_SUCCESS (12288)
F/flutter ( 6207): [FATAL:flutter/shell/platform/android/platform_view_android.cc(28)] Check failed: android_surface_. Could not create an OpenGL, Vulkan or Software surface to setup rendering.
E/flutter ( 6229): [ERROR:flutter/shell/platform/android/android_context_gl.cc(165)] Could not choose an EGL configuration.
E/flutter ( 6229): [ERROR:flutter/shell/platform/android/android_context_gl.cc(53)] EGL Error: EGL_SUCCESS (12288)
F/flutter ( 6229): [FATAL:flutter/shell/platform/android/platform_view_android.cc(28)] Check failed: android_surface_. Could not create an OpenGL, Vulkan or Software surface to setup rendering.

后来,在GitHub上总算找到解决办法,忽略配置

//使用以下命令代替flutter run
flutter run --enable-software-rendering -d all

详细GitHub原问题见:https://github.com/flutter/flutter/issues/22671

(注意要!!!)

成功如下:

window下安装flutter,连接蓝叠模拟器遇到的问题及解决办法_第2张图片

你可能感兴趣的:(前端)