Flutter在生产版本中显示GridView/Listview的空白屏幕 [英] Flutter shows blank screen for GridView/Listview in production build

查看:91
本文介绍了Flutter在生产版本中显示GridView/Listview的空白屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的flutter应用程序,该应用程序基本上显示了网格项目.在调试模式下,网格项目正常显示.但是,在生产模式下,颤振仅显示空白屏幕.我什至实现了拉动刷新.现在,当我拉动刷新页面时,它仍然没有显示.

I created a simple flutter app which basically shows grid items. In debug mode, the grid items shows normally. However, in production mode, flutter just shows blank screen. I even implemented pull to refresh. Now, when I pull to refresh the page, it still doesn't show.

在调试模式下,仿真器和真实设备均可正常工作.我使用以下代码来构建适用于Android的应用程序:

In debug mode, both emulator and real device works fine. I use the following code to build the app for Android:

flutter build apk --target-platform android-arm,android-arm64 --split-per-abi

这是我的代码: https://github.com/SanjayBanjade/flutter-ecommerce

推荐答案

在您的 AndroidManifest.xml 文件中添加Internet权限:

Add Internet permission in your AndroidManifest.xml file :

<uses-permission android:name="android.permission.INTERNET"/>

https://github.com/SanjayBanjade/flutter-ecommerce/blob/master/android/app/src/main/AndroidManifest.xml

这篇关于Flutter在生产版本中显示GridView/Listview的空白屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆