Flutter提供程序无法在发行版APK中工作,但在调试模式下可以正常工作 [英] Flutter provider not working in release apk, but working fine in debug mode

查看:133
本文介绍了Flutter提供程序无法在发行版APK中工作,但在调试模式下可以正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提供程序应该努力向使用者提供实时更新,但只能在调试模式下工作,而不能在发布模式下工作.我是否必须再次使用状态完整的小部件以设置状态更新ui,有任何线索?

the provider should work to provide real time updates to consumers but only works in debug mode and not release mode. do i have to use the state full widget again to update the ui with set state, any clue?

推荐答案

可能错过了在AndroidManifest.xml

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

我们必须在AndroidManifest.xml文件中添加Internet权限才能发布版本.在调试模式下工作正常.如果您一直在调用提供程序中的api调用.我做过同样的错误并解决了该问题.

We have to add Internet permission in AndroidManifest.xml file for release build. It is working fine in debug mode. If you have been calling api call in provider. Same mistake I have done and resolved that issue.

这篇关于Flutter提供程序无法在发行版APK中工作,但在调试模式下可以正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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