【问题标题】:Chrome Required value 'version' is missing or invalid. It must be between 1-4 dot-separated integers each between 0 and 65536Chrome 必需值“版本”缺失或无效。它必须是 1-4 个点分隔的整数,每个整数介于 0 到 65536 之间
【发布时间】:2015-12-31 22:07:00
【问题描述】:

我一直在尝试创建一个个性化的主题,但每次我上传 chrome 时都会说 “必需的值 'version' 丢失或无效。它必须是 1-4 个点分隔的整数,每个整数介于 0 和 65536 之间'这是我第一次尝试,所以我不知道我必须改变什么。即使我做了,我也会改变它。我该如何解决这个问题? p>

{
  "manifest_version": 2,
  "name": "Chrome Themes",
  "theme": {
    "images" : {
      "theme_frame" : "Images/Cracked Dimensions.jpg",
      "theme_toolbar" : "Images/Cracked Dimensions.jpg",
      "theme_ntp_background" : "Images/Halloween Whopper.jpg",
    "theme_tab_background" : "Images/Halloween Whopper.jpg"}
    }
    ,"colors" : {
        "ntp_link": [118,17,25], 
    "ntp_text": [118,17,25], 
    "ntp_section_link": [118,17,25], 
    "ntp_section_text": [51 , 55 , 58],
    "ntp_background": [51 , 55 , 58], 
    "frame": [51 , 55 , 58], 
    "toolbar": [51 , 55 , 58], 
    "tab_text": [118,17,25], 
    "tab_background_text": [51 , 55 , 58], 
    "bookmark_text": [118,17,25]
    },
    "tints" : {
                "buttons" : [0.33, 0.5, 0.47],
                "frame_inactive": [0.50, 0.50, 0.50], 
                "frame_incognito_inactive": [0.50, 0.50, 0.50] 
    },
    "properties" : {
        "ntp_background_alignment" : "center",
    "ntp_background_repeat": "no-repeat"
    }
  }

【问题讨论】:

    标签: google-chrome-devtools


    【解决方案1】:

    这是定义“version”和“manifest_version”的正确方法

    "version": "1.0",
    "manifest_version": 2,
    

    【讨论】:

    • 我意识到"version": "v0.0.1"是无效的,它不应该包含诸如“v”之类的字母所以:"version": "0.0.1"
    【解决方案2】:

    我遇到了同样的问题,我终于找到了适合我的解决方案。
    您还需要将版本号用双引号括起来。

    "version": "1.0",
    


    希望这会有所帮助!

    【讨论】:

      【解决方案3】:

      正如错误所指出的,您必须有一个version 键,其中包含由. 分隔的一到四个数值。

      例如:

      "version": "45.0.2454.93"
      

      完整的 JSON:

      {
        "version": "45.0.2454.93",
        "manifest_version": 2,
        "name": "Chrome Themes",
        "theme": {
          "images" : {
            "theme_frame" : "Images/Cracked Dimensions.jpg",
            "theme_toolbar" : "Images/Cracked Dimensions.jpg",
            "theme_ntp_background" : "Images/Halloween Whopper.jpg",
          "theme_tab_background" : "Images/Halloween Whopper.jpg"}
          }
          ,"colors" : {
              "ntp_link": [118,17,25], 
          "ntp_text": [118,17,25], 
          "ntp_section_link": [118,17,25], 
          "ntp_section_text": [51 , 55 , 58],
          "ntp_background": [51 , 55 , 58], 
          "frame": [51 , 55 , 58], 
          "toolbar": [51 , 55 , 58], 
          "tab_text": [118,17,25], 
          "tab_background_text": [51 , 55 , 58], 
          "bookmark_text": [118,17,25]
          },
          "tints" : {
                      "buttons" : [0.33, 0.5, 0.47],
                      "frame_inactive": [0.50, 0.50, 0.50], 
                      "frame_incognito_inactive": [0.50, 0.50, 0.50] 
          },
          "properties" : {
              "ntp_background_alignment" : "center",
          "ntp_background_repeat": "no-repeat"
          }
        }
      

      【讨论】:

      • chrome 现在说 “Manifest is not valid JSON. Line: 3, column: 3, Syntax error.” 为什么 chrome 不能识别它? @Mureinik
      • @YnezTorres 我在version 条目后缺少一个逗号,抱歉。已编辑和修复。
      • Chrome 现在说 Could not load 'C:\Users\Titan\Downloads\Chrome Themes\Images\Images/Cracked Dimensions.jpg", @Mureinik 也是文件大或图片尺寸错误?主题框架和工具栏有什么要求?感谢您尝试帮助我。
      【解决方案4】:
      "version": "1.0",
      "manifest_version": 2,
      

      使用此代码。您将获得解决方案。

      【讨论】:

        猜你喜欢
        • 2018-10-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-01-22
        相关资源
        最近更新 更多