douxianglu4370
douxianglu4370
2018-02-09 12:33
浏览 65

我的manifest.json出了什么问题

I'm trying to add a manifest.json to my web app (made in php) so the users can add it to their homescreen.

Here's my manifest json:

{
  "name": "OrganizaMeuCasamento",
  "short_name": "MeuCasamento",
  "theme_color": "#995a6d",
  "background_color": "#000000",
  "orientation": "portrait",
  "display": "fullscreen",
  "start_url": "https://meucasamento.organizaeventos.net",
  "icons": [
    {
      "src": "logopwa.png",
      "sizes": "70x70",
      "type": "image/png"
    }
    {
    "src": "icon-256x256.png",
    "sizes": "256x256",
    "type": "image/png"
    }
  ]
}

I linked it on my index.php but on my GoogleDevTools it doesn't get recognized. What have I done wrong? It's a error on manifest.json itself or on the link on index.php

here is the link: meucasamento.organizaeventos.net

image of GoogleDevTools googledevtools-no-manifest-detected

图片转代码服务由CSDN问答提供 功能建议

我正在尝试将manifest.json添加到我的网络应用程序(用php制作),以便用户可以添加 这是我的清单json:

  {
“name”:“OrganizaMeuCasamento”,
“short_name  “:”MeuCasamento“,
”theme_color“:”#995a6d“,
”background_color“:”#000000“,
”orientation“:”portrait“,
”display“:”fullscreen“,
  “start_url”:“https://meucasamento.organizaeventos.net”,
“icons”:[
 {
“src”:“logopwa.png”,
“sizes”:“70x70”,
  “type”:“image / png”
} 
 {
“src”:“icon-256x256.png”,
“sizes”:“256x256”,
“type”:“image / png”  
} 
] 
} 
   
 
 

我将它链接到我的index.php上,但在我的GoogleDevTools上却无法识别。 我做了什么 错误? 这是manifest.json本身或index.php上的链接上的错误

这里是链接: meucasamento.organizaeventos.net

图像 of GoogleDevTools

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dsfliu1129
    dsfliu1129 2018-02-09 12:36
    已采纳
    {
      "name": "OrganizaMeuCasamento",
      "short_name": "MeuCasamento",
      "theme_color": "#995a6d",
      "background_color": "#000000",
      "orientation": "portrait",
      "display": "fullscreen",
      "start_url": "https://meucasamento.organizaeventos.net",
      "icons": [
        {
          "src": "logopwa.png",
          "sizes": "70x70",
          "type": "image/png"
        },
        {
        "src": "icon-256x256.png",
        "sizes": "256x256",
        "type": "image/png"
        }
      ]
    }
    

    you forgot one , inside your icon array. Now it should work if you use the good tag inside your html

    点赞 评论

相关推荐