周凯,个人博客

  • 前端
  • 嵌入式
  • 工具
  • 后端
  • 随笔
个人记录
  1. 首页
  2. flutter
  3. 正文

flutter 打包release部分功能无法使用

2022年 10月 29日 1937点热度 0人点赞 0条评论

问题分析

  • flutter本地测试debug打包、运行功能正常使用,但是打包release之后发现部分功能无法使用,直接卡到首屏,路由也不执行跳转
  • 本地运行 flutter run --release --verbose 发现没有任何错误

问题猜测

  • 打包release版本参数配置问题,混淆,或者tree shaking 部分代码没有生效?

问题解决

  • 参考flutter中文网 android版本打包release

    • https://flutterchina.club/android-release/
  • 参考 release打包闪退

    • https://segmentfault.com/a/1190000021610587
  • 直接在 app/build.gradle配置

    flutter打包release

    minifyEnabled false //删除无用代码
    shrinkResources false //删除无用资源
  • 重新打包问题解决

🎯 拓展阅读提示

本文涉及的内容已同步至公众号后台,我会在那里分享更多深度内容和实用技巧

→ 点击关注:一行梦境

公众号二维码
本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: 暂无
最后更新:2022年 10月 29日

周凯

这个人很懒,什么都没留下

打赏 点赞

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2022-现在 周凯,个人博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

蒙ICP备18004897号