【问题标题】:No Manifest Detected Flutter PWA未检测到清单 Flutter PWA
【发布时间】:2021-10-27 21:07:54
【问题描述】:

虽然head标签中有一个有效的manifest.json<link rel="manifest" href="manifest.json">,但是chrome显示No Manifest Detected,Service Worker安装成功,http://127.0.0.1:8080/manifest.json可以正常访问,但是chrome不行甚至请求manifest.json 文件!这是一个 Flutter 项目,目前使用 flutter build web --release 为 web 构建

【问题讨论】:

    标签: flutter progressive-web-apps flutter-web manifest.json


    【解决方案1】:

    最后我发现这个 bug 是由 flutter_native_splash 引入的,它在 html 页面的根目录中添加了一些 picture 标签,导致 chrome 不请求 manifest.json,因此将图片标签移动到正文解决了这个问题。

    https://pub.dev/packages/flutter_native_splash

    猜你喜欢
    • 1970-01-01
    • 2021-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-30
    • 2018-08-10
    • 1970-01-01
    相关资源
    最近更新 更多