【问题标题】:Can't submit my extension to the Chrome Web Store: "An error occurred: Invalid manifest."无法将我的扩展程序提交到 Chrome 网上应用店:“发生错误:清单无效。”
【发布时间】:2012-12-27 17:33:49
【问题描述】:

我正在尝试向 Chrome 网上应用店提交 Google Chrome 扩展程序,但我收到以下错误:

发生错误:清单无效。如果您的清单包含 cmets,请删除它们,因为我们的库尚不支持它们。

这是我的 manifest.json:

{
    "name": "IMGit Image Uploader",
    "version": "1",
    "description": "Easy and fast image uploading from a simple right click.",
    "background": {"page": "imgit.html"},
    "icons": {
        "16": "16.png",
        "48": "48.png",
        "128": "128.png"
    },
    "permissions": ["contextMenus","tabs","http://*/*","https://*/*",],
    "manifest_version": 2,
}

Adobe Dreamweaver 在第 2 行显示语法错误。不知道为什么。

怎么了?

【问题讨论】:

  • 使用 jslint.com,它会告诉你你的 JSON 错误。

标签: json google-chrome-extension manifest chrome-web-store


【解决方案1】:

尝试去掉 JSON 中的 both 个额外的逗号:

{
"name": "IMGit Image Uploader",
"version": "1",
"description": "Easy and fast image uploading from a simple right click.",
"background": {
    "page": "imgit.html"
},
"icons": {
    "16": "16.png",
    "48": "48.png",
    "128": "128.png"
},
"permissions": [
    "contextMenus",
    "tabs",
    "http://*/*",
    "https://*/*"
],
"manifest_version": 2
}

您可以验证您的 JSON 文件 here。

【讨论】:

    猜你喜欢
    • 2012-12-18
    • 1970-01-01
    • 2021-09-02
    • 2013-02-21
    • 1970-01-01
    • 2014-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多