From 05b813e9dcfc42cd3e8ea378920621a7399abe1e Mon Sep 17 00:00:00 2001 From: longwei Date: Tue, 28 Mar 2023 12:12:18 +0000 Subject: [PATCH] add error code for install and uninstall Change-Id: Ice75774bc63820f00b84c47aa017ed6495085631 Signed-off-by: longwei --- .../reference/apis/js-apis-installer.md | 4 ++- .../reference/errorcodes/errorcode-bundle.md | 32 ++++++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-installer.md b/zh-cn/application-dev/reference/apis/js-apis-installer.md index 1e92502faf..d6cbe68924 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-installer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-installer.md @@ -118,7 +118,8 @@ install(hapFilePaths: Array<string>, installParam: InstallParam, callback: | 17700017 | Failed to install the HAP since the version of the HAP to install is too early. | | 17700018 | Failed to install because the dependent module does not exist. | | 17700031 | Failed to install the HAP because the overlay check of the HAP is failed. | -| 17700036 | Failed to install because without allow app shared bundle permission. | +| 17700036 | Failed to install the HSP because lacks appropriate permissions. | +| 17700039 | Failed to install because disallow install a shared bundle by hapFilePaths. | **示例:** @@ -176,6 +177,7 @@ uninstall(bundleName: string, installParam: InstallParam, callback: AsyncCallbac | -------- | ------------------------------------------------------------ | | 17700004 | The specified user ID is not found. | | 17700020 | The specified bundle is pre-installed bundle which cannot be uninstalled. | +| 17700040 | The specified bundle is a shared bundle which cannot be uninstalled. | **示例:** diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-bundle.md b/zh-cn/application-dev/reference/errorcodes/errorcode-bundle.md index 7f3f91ebc6..c68152ab39 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-bundle.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-bundle.md @@ -471,7 +471,7 @@ The specified bundle is an overlay bundle. ## 17700036 共享库缺少AllowAppShareLibrary特权导致安装失败 **错误信息**
-Failed to install because without allow app shared bundle permission. +Failed to install the HSP because lacks appropriate permissions. **错误描述**
共享库未申请配置AllowAppShareLibrary特权,可能存在安全隐私风险,不允许安装。 @@ -514,4 +514,34 @@ The specified shared bundle does not exist. 1. 检查被卸载的shared library是否存在于当前设备中。 2. 检查被卸载的版本是否存在于被卸载的shared library中。 +## 17700039 不允许安装应用间共享库 +**错误信息**
+Failed to install because disallow install a shared bundle by hapFilePaths. + +**错误描述**
+安装应用时,传入的安装包为应用间共享库类型。 + +**可能原因**
+1. 通过bm工具安装应用时,-p参数传入了应用间共享库的安装包路径。 +2. 通过install接口安装应用时,hapFilePaths参数传入了应用间共享库的安装包路径。 + +**处理步骤**
+1. 通过-s参数指定应用间共享库的安装包路径。 +2. 通过installParam参数的sharedBundleDirPaths字段指定应用间共享库的安装包路径。 + +## 17700040 不允许卸载应用间共享库 +**错误信息**
+The specified bundle is a shared bundle which cannot be uninstalled. + +**错误描述**
+卸载应用时,传入的是应用间共享库的包名。 + +**可能原因**
+1. 通过bm工具卸载应用时,-n参数传入了应用间共享库的包名。 +2. 通过uninstall接口卸载应用时,bundleName传入的是应用间共享库的包名。 + +**处理步骤**
+1. 通过-s参数指定卸载的应用为共享库应用。 +2. 通过UninstallParam参数的bundleName及versionCode指定卸载的共享库的包名及版本。 + \ No newline at end of file -- GitLab