简体   繁体   English

我无法在谷歌工作区市场上发布编辑器插件 - 安装应用程序后未显示菜单选项

[英]I cannot publish Editor addon on google workspace marketplace -Menu options not shown after App is installed

I have applied to publish an editor add-on on the Google workspace marketplace.我已申请在 Google 工作区市场上发布一个编辑器插件。

I have applied to publish an editor add-on on the Google workspace marketplace, but it has been rejected for the following reasons我已申请在 Google 工作区市场上发布编辑器插件,但由于以下原因被拒绝

Menu - Menu options not shown after App is installed.菜单 - 安装应用程序后不显示菜单选项。 Please ensure that the add-on correctly uses onInstall() and onOpen() to populate its menu.请确保插件正确使用 onInstall() 和 onOpen() 来填充其菜单。 The menu items populate when the add-on is first installed and when a different file is opened.首次安装插件和打开不同文件时会填充菜单项。 See Editor add-on authorization.请参阅编辑器附加授权。

In the test of the editor add-on in my environment, the menu is displayed without any problem.在我的环境中测试编辑器插件,菜单显示没有任何问题。

Here is the code.这是代码。 *The contents of unrelated functions are omitted. *无关功能的内容被省略。

function GlobalVar(userLocale){
  if(userLocale === null) userLocale = 'ja';
  return {
    TITLE: (userLocale == 'ja') ? 'こぴぺ' : 'Copipe', //アドオンのタイトル
    VERSION: '1.1.2', //アプリのバージョン
  }
}


function onInstall(e){
  onOpen(e);
}


 function onOpen(e){
  var menu = SpreadsheetApp.getUi().createAddonMenu();
  var userLocale = Session.getActiveUserLocale(); //ユーザーが使用している言語判定
  if(userLocale != 'ja') userLocale = 'en'; //日本語以外の場合は英語表記にする

  var itemInfo = {
    Item1 : {func:'display_sidebar', ja: '操作パネル表示', en: 'Show Sidebar'},
    Item2 : {func:'dispVersion', ja: 'バージョン情報',en: 'about version'}
  };
  menu.addItem(itemInfo.Item1[userLocale],itemInfo.Item1.func)
    .addSeparator()
    .addItem(itemInfo.Item2[userLocale],itemInfo.Item2.func);  

  menu.addToUi(); //メニューを追加
}



function askEnabled(){
  let userLocale = Session.getActiveUserLocale();
  let title = GlobalVar(userLocale).TITLE;
  let msg = userLocale === 'ja' ? "スクリプトが有効になりました\nもう一度メニュー画面を開いてサイドバーを表示させてください" : "The script has been enabled.\nOpen the menu screen again to display the sidebar.";
  let ui = SpreadsheetApp.getUi();
  ui.alert(title, msg, ui.ButtonSet.OK);
  onOpen();
};


function display_sidebar(){
  let userLocale = Session.getActiveUserLocale(); //ユーザーが使用している言語判定

  let SidebarHTML = HtmlService.createTemplateFromFile('sidebar');
  SidebarHTML.LANGUAGE = userLocale; //サイドバーに言語情報を送る
  let Sidebar = SidebarHTML.evaluate().setTitle(GlobalVar(userLocale).TITLE);
  SpreadsheetApp.getUi().showSidebar(Sidebar); //サイドバーを表示 
}


function dispVersion(){
  let userLocale = Session.getActiveUserLocale(); //ユーザーが使用している言語判定

  Browser.msgBox(GlobalVar(userLocale).TITLE + " Version",'Version:  ' +GlobalVar(userLocale).VERSION, Browser.Buttons.OK);
}


function toolTask(TASK_ORDER){
  return toolTaskRun().start(TASK_ORDER);
}

function toolTaskRun() {
  return {
    SPRED: null,
    SHEET: null,
    JOB: null,
    INFO: null,
    TAG_NAME: '_copipe_',
    
    init: function(){
      this.SPRED = SpreadsheetApp.getActiveSpreadsheet();
      this.SHEET = this.SPRED.getActiveSheet();
    },
    start: function(TASK_ORDER){
     
    },
    copy: function(){
      
    },
    paste: function(TAISHO){
      
    },
    moveRows: function(){
      
    },
    moveColumns: function(){
      
    },
    
    zettai: function(MODE){
      
    }
  };
}

Apart from this, I load my own libraries.除此之外,我还加载了自己的库。

The manifesto is below.宣言如下。

{
  "timeZone": "Asia/Tokyo",
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "dependencies": {
    "libraries": [
      {
        "userSymbol": "SetNamedRange",
        "version": "0",
        "libraryId": "1M0tYhnFHYkxl0IXsDju8NWTvWHZWBY8H4-Z7eFOIKyi26p-Ymmtu7C7r",
        "developmentMode": true
      }
    ]
  },
  "oauthScopes": [
    "https://www.googleapis.com/auth/spreadsheets",
    "https://www.googleapis.com/auth/script.container.ui",
    "https://www.googleapis.com/auth/userinfo.email"
  ]
}

I have no idea what to change.我不知道要改变什么。 Can someone please tell me what to do?有人可以告诉我该怎么做吗?

  1. Change the development mode of your library to false将库的开发模式更改为 false
    1. Assure that the Apps Script project holding your library has been deployed确保已部署包含您的库的 Apps 脚本项目
    2. Assure that the Apps Script project holding the add-on code is set to use version of you library确保将包含附加代码的 Apps 脚本项目设置为使用您的库的版本
  2. Assure that the library is shared with anyone having the link确保图书馆与任何拥有链接的人共享

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在 google workspace marketplace 上发布编辑器插件 - 安装应用程序后不显示菜单选项。 请确保加载项正确 - Cannot publish Editor addon on google workspace marketplace -Menu options not shown after App is installed. Please ensure that the add-on correctly 由于“安装应用程序后未显示菜单选项...”错误,无法发布谷歌编辑器插件 - Cannot publish the google editor addon due to "Menu options not shown after App is installed..." error 如何设计 Google Workspace Marketplace Addon? - How to style a Google Workspace Marketplace Addon? 如何获取已安装 Google Workspace Marketplace 应用程序的用户列表 - How to get list of users who have installed the app for Google workspace Marketplace 无法将Google编辑器附加组件发布到G Suite市场 - Unable to publish Google editor add-on to the G Suite Marketplace 找不到在 Google Workspace Marketplace 之前编写的 Google Apps 脚本 - Cannot find Google Apps Script written before Google Workspace Marketplace 使用新的 G Suite Marketplace 流程私下发布 Google Sheets 插件(无需验证) - Publish Google Sheets addon privately (no-verification) with new G Suite Marketplace process 如何接受 Google Workspace Marketplace 的条款及条件? - How do I accept the terms and conditions of the Google Workspace Marketplace? 是否可以将 Google Apps Script Web App 发布到 G Suite Marketplace? - Is it possible to publish a Google Apps Script Web App to G Suite Marketplace? 安装已部署的插件后,“Google 侧面板”中不显示“Google 工作区私有插件图标” - “Google workspace private Addon icon” is not displayed in the “google side panel” after installing the deployed addon
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM