Flutter:正在运行/调试应用程序-> 黑屏并且无法在屏幕表面上包裹 Android 模拟器
Posted
技术标签:
【中文标题】Flutter:正在运行/调试应用程序-> 黑屏并且无法在屏幕表面上包裹 Android 模拟器【英文标题】:Flutter: Running/Debugging app -> Black screen and Could not wrap onscreen surface Android Emulator 【发布时间】:2018-01-15 03:14:55 【问题描述】:获得了最新最好的 Flutter,我在我的 android 模拟器上看到了黑屏,并且在控制台中看到了以下错误。
关于如何解决这个问题的任何想法?
E/flutter ( 4538): [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(161)] Could not wrap onscreen surface.
E/flutter ( 4538): [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(161)] Could not wrap onscreen surface.
I/chatty ( 4538): uid=10086(u0_a86) gpu_thread identical 50 lines
Flutter 医生结果:
[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel alpha)
• Flutter at /Users/michaelrtraverso/dev/flutter
• Framework revision bbcfb8d51a (6 days ago), 2017-08-01 14:50:29 -0700
• Engine revision f2af347363
• Tools Dart version 1.25.0-dev.7.0
[✓] Android toolchain - develop for Android devices (Android SDK 26.0.1)
• Android SDK at /Users/michaelrtraverso/dev/android-sdk-macosx
• Platform android-26, build-tools 26.0.1
• ANDROID_HOME = /Users/michaelrtraverso/dev/android-sdk-macosx
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] ios toolchain - develop for iOS devices (Xcode 8.3.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.3, Build version 8E3004b
• ios-deploy 1.9.1
• CocoaPods version 1.2.1
[✓] Android Studio
• Android Studio at /Applications/Android Studio 3.0 Preview.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-884-b01)
[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] IntelliJ IDEA Ultimate Edition (version 2017.2)
• Flutter plugin version 15.2
• Dart plugin version 172.3317.48
[✓] Connected devices
• Android SDK built for x86 • emulator-5554 • android-x86 • Android O (API 25) (emulator)
【问题讨论】:
【参考方案1】:好的,所以这不是一个修复,但 alpha 通道中的最新 Flutter 版本似乎已被破坏。切换到主频道可以让 Android 应用重新焕发生机。在您的终端中:
flutter channel master
然后重新运行,您应该可以重新开始营业了。
【讨论】:
最新版本好像已经修复了。以上是关于Flutter:正在运行/调试应用程序-> 黑屏并且无法在屏幕表面上包裹 Android 模拟器的主要内容,如果未能解决你的问题,请参考以下文章
Flutter:一个程序在调试模式下运行良好,但在发布后就不行,为啥?
Flutter如何调试应用Dart Observatory 以及调试模式断言
Android Studio 中的 Flutter 集成测试运行/调试配置