android - Flutter 构建 apk 并安装得到 flash 空白屏幕
问题描述
当我构建颤振应用程序并安装在真正的安卓手机上时,我得到了这些错误。
Launching lib/src/config/flavors/main_stage.dart on DUB AL00 in debug mode...
✓ Built build/app/outputs/apk/debug/app-debug.apk.
E/flutter (32542): [ERROR:flutter/shell/gpu/gpu_surface_gl.cc(70)] Failed to setup Skia Gr context.
Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:52745/fiENvL9drJE=/ws
Exited (sigterm)
我在谷歌上搜索说 add --enable-software-rendering ,这适用于调试模式,但是当我构建可安装的 APK 时如何工作?如果我以发布模式运行,则此参数不起作用。
有人可以帮忙吗?谢谢
解决方案
flutter run --enable-software-rendering
应该作为一种解决方法。CC @mit-mit, @cbracken @chinmaygarde 我以为我们已经决定让 Android Emulators 默认为软件渲染?(我似乎找不到跟踪的问题)?
资源
推荐阅读
- algorithm - 2n 和 m 代表什么?
- android - 如何使用 android 获取 Firebase 数据库中的值?
- c++ - 如何在不知道最初输入多少值的情况下将整数存储到数组中
- amazon-web-services - 使用 AWS Lambda 批量处理文件的超时问题
- python - 我得到 ValueError: 'Dip Time' 不在列表中
- android - WorkManager 和 Kodein
- microservices - 身份验证策略的 Istio 替代方案是什么,开发的 Istio 流程是什么?
- linkedin - LinkedIn - 无法创建访问令牌,回复“此应用程序不允许创建应用程序令牌”。#linkedin
- php - 邮件函数返回真但没有收到电子邮件
- c# - 构建 IQueryable
然后将其附加到 DbSet