【问题标题】:How to get correct icon path for 'manifest.json'?如何获得“manifest.json”的正确图标路径?
【发布时间】:2019-04-22 09:50:51
【问题描述】:

在我的 manifest.json 中,我有以下代码

"icons": [
{
  "src": "/static/img/icons/android-chrome-192x192.png",
  "sizes": "192x192",
  "type": "image/png"
},
{
  "src": "/static/img/icons/android-chrome-512x512.png",
  "sizes": "512x512",
  "type": "image/png"
}

当我打开浏览器时,我的控制台中出现这些错误

Error while trying to use the following icon from the Manifest: http://localhost:8080/static/img/icons/android-chrome-192x192.png (Resource size is not correct - typo in the Manifest?)

我仔细检查了文件夹中的图标名称是否正确。所以图标名称不应该是这样。当我单击该链接时,图像已显示。可能是什么错误? 我的静态文件夹 ---

【问题讨论】:

  • 您的static 文件夹在哪里?在根文件夹内?
  • 问题已编辑。你可以看到我的静态文件夹。
  • 没有答案?

标签: vue.js manifest.json


【解决方案1】:

值得检查您的图标文件夹是否被 Apache 或 Nginx 覆盖 - https://electrictoolbox.com/apache-icons-directory/。在这种情况下 manifest.json 将不存在。在这种情况下,请使用图标以外的其他名称作为文件夹名称并根据需要更新您的标题。

【讨论】:

    猜你喜欢
    • 2013-01-10
    • 1970-01-01
    • 2015-02-12
    • 1970-01-01
    • 2020-02-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-21
    相关资源
    最近更新 更多