为何我的PWA已有Install按钮却无法正确安装?
PWA安装异常:主屏幕图标带Chrome标识,控制台报
failed to install webApk for: [manifest的url] 我正在开发一款Progressive Web App (PWA),尝试安装到手机和电脑上,遇到了以下问题:
- Manifest已配置完成,在
<head>中正确引用并加载,可通过Chrome DevTools(Application > Manifest)查看,无任何警告 - Service Worker正常运行
- 手机端访问时,底部有安装横幅,右上角菜单里显示"Install"选项(而非「添加到主屏幕」)
- 点击安装后看似完成,但主屏幕上的图标仍带有Chrome标识,说明PWA未被正确安装
- 将手机连接电脑调试,安装时控制台出现错误:
failed to install webApk for: [manifest的url]
谷歌搜索该错误仅得到Chromium源码相关结果,以下是我的manifest.json文件:
{ "id": "/index.php", "name": "NAME", "short_name": "NAME", "description": "DESCRIPTION", "start_url": "/index.php", "scope": "/", "display": "standalone", "background_color": "#582C7A", "theme_color": "#FF7F01", "lang": "fr", "orientation": "portrait", "icons": [ { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" }, { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" }, { "src": "/maskable_icon_x512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }, { "src": "/assets/icon/logo.svg", "sizes": "any", "type": "image/svg+xml", "purpose": "any" } ] }
请问如何解决这个问题,让PWA能正确安装?
内容的提问来源于stack exchange,提问作者Gugu72
相关产品推荐
相关产品推荐

