You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Cordova安装com-sarriaroman-photoviewer插件分支提示无效标签名的解决方法

解决Cordova PhotoViewer插件v1.3.0安装问题
  • 使用完整Git仓库URL安装
    之前的命令缺少完整的Git地址前缀,导致标签解析错误,执行以下命令即可安装master分支的最新代码(即包含v1.3.0的版本):

    cordova plugin add https://github.com/sarriaroman/PhotoViewer.git#master
    

    如果仓库里存在v1.3.0的标签,也可以直接指定标签安装:

    cordova plugin add https://github.com/sarriaroman/PhotoViewer.git#v1.3.0
    
  • 本地克隆后手动安装
    如果网络问题或Git地址安装仍报错,可手动操作:

    1. 克隆仓库到本地:
      git clone https://github.com/sarriaroman/PhotoViewer.git
      
    2. 切换到v1.3.0对应的代码版本(需确认仓库有该标签或分支):
      cd PhotoViewer
      git checkout v1.3.0
      
    3. 在Cordova项目目录下执行本地安装:
      cordova plugin add ./PhotoViewer
      
  • 额外排查步骤

    • 若安装前已存在旧版本插件,先移除再安装:
      cordova plugin remove com-sarriaroman-photoviewer
      
    • 可先查看仓库的分支/标签列表,确认v1.3.0代码所在的具体分支或标签名,避免安装错误版本。

内容的提问来源于stack exchange,提问作者rolinger

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 03:22:48