未验证 提交 f2645563 编写于 作者: O openharmony_ci 提交者: Gitee

!12922 修改资料检视问题

Merge pull request !12922 from shilei91/master
# BundleStatusCallback
> **说明:**
> 从API version 9开始不再支持。建议使用[bundleMonitor](js-apis-bundleMonitor.md)替代
> 本模块首批接口从API version 8 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本
应用状态回调的信息,通过接口[innerBundleManager.on](js-apis-Bundle-InnerBundleManager.md)获取。
......
......@@ -7,7 +7,7 @@
## BundleInstaller.install<sup>(deprecated)<sup>
> 从API version 9开始不再维护,建议使用[install](js-apis-installer.md)替代。
> 从API version 9开始不再维护,建议使用[@ohos.bundle.installer.install](js-apis-installer.md)替代。
install(bundleFilePaths: Array&lt;string&gt;, param: InstallParam, callback: AsyncCallback&lt;InstallStatus&gt;): void;
......@@ -42,7 +42,7 @@ let installParam = {
installFlag: 1,
};
bundle.getBundleInstaller().then(installer=>{
bundle.getBundleInstaller().then(installer => {
installer.install(hapFilePaths, installParam, err => {
if (err) {
console.error('install failed:' + JSON.stringify(err));
......@@ -92,7 +92,7 @@ let installParam = {
installFlag: 1,
};
bundle.getBundleInstaller().then(installer=>{
bundle.getBundleInstaller().then(installer => {
installer.uninstall(bundleName, installParam, err => {
if (err) {
console.error('uninstall failed:' + JSON.stringify(err));
......@@ -142,7 +142,7 @@ let installParam = {
installFlag: 1,
};
bundle.getBundleInstaller().then(installer=>{
bundle.getBundleInstaller().then(installer => {
installer.recover(bundleName, installParam, err => {
if (err) {
console.error('recover failed:' + JSON.stringify(err));
......@@ -165,9 +165,9 @@ bundle.getBundleInstaller().then(installer=>{
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ----------- | ------- | ---- | ---- | ------------------ |
| userId | number | 是 | 否 | 指示用户id |
| installFlag | number | 是 | 否 | 指示安装标志 |
| isKeepData | boolean | 是 | 否 | 指示参数是否有数据 |
| userId | number | 是 | 否 | 指示用户id, 默认值:调用方的userId |
| installFlag | number | 是 | 否 | 指示安装标志, 默认值:1, 取值范围:</br>1: 覆盖安装, </br>16: 免安装|
| isKeepData | boolean | 是 | 否 | 指示参数是否有数据,默认值:false |
## InstallStatus<sup>(deprecated)<sup>
......@@ -179,8 +179,8 @@ bundle.getBundleInstaller().then(installer=>{
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------ |
| status | bundle.[InstallErrorCode](js-apis-Bundle.md#installerrorcode) | 是 | 否 | 表示安装或卸载错误状态码。 |
| statusMessage | string | 是 | 否 | 表示安装或卸载的字符串结果信息。 |
| status | bundle.[InstallErrorCode](js-apis-Bundle.md#installerrorcode) | 是 | 否 | 表示安装或卸载错误状态码。取值范围:枚举值[InstallErrorCode](js-apis-Bundle.md#installerrorcode) |
| statusMessage | string | 是 | 否 | 表示安装或卸载的字符串结果信息。取值范围包括:<br/> "SUCCESS" : 安装成功,</br> "STATUS_INSTALL_FAILURE": 安装失败(不存在安装文件), </br> "STATUS_INSTALL_FAILURE_ABORTED": 安装中止, </br> "STATUS_INSTALL_FAILURE_INVALID": 安装参数无效, </br> "STATUS_INSTALL_FAILURE_CONFLICT": 安装冲突(常见于升级和已有应用基本信息不一致), </br> "STATUS_INSTALL_FAILURE_STORAGE": 存储包信息失败, </br> "STATUS_INSTALL_FAILURE_INCOMPATIBLE": 安装不兼容(常见于版本降级安装或者签名信息错误), </br> "STATUS_UNINSTALL_FAILURE": 卸载失败(不存在卸载的应用), </br> "STATUS_UNINSTALL_FAILURE_ABORTED": 卸载中止(没有使用), </br> "STATUS_UNINSTALL_FAILURE_ABORTED": 卸载冲突(卸载系统应用失败, 结束应用进程失败), </br> "STATUS_INSTALL_FAILURE_DOWNLOAD_TIMEOUT": 安装失败(下载超时), </br> "STATUS_INSTALL_FAILURE_DOWNLOAD_FAILED": 安装失败(下载失败), </br> "STATUS_RECOVER_FAILURE_INVALID": 恢复预置应用失败, </br> "STATUS_ABILITY_NOT_FOUND": Ability未找到, </br> "STATUS_BMS_SERVICE_ERROR": BMS服务错误, </br> "STATUS_FAILED_NO_SPACE_LEFT": 设备空间不足, </br> "STATUS_GRANT_REQUEST_PERMISSIONS_FAILED": 应用授权失败, </br> "STATUS_INSTALL_PERMISSION_DENIED": 缺少安装权限, </br> "STATUS_UNINSTALL_PERMISSION_DENIED": 缺少卸载权限|
## 获取应用的沙箱路径
对于FA模型,应用的沙箱路径可以通过[Context](js-apis-inner-app-context.md)中的方法获取;对于Stage模型,应用的沙箱路径可以通过[Context](js-apis-ability-context.md#abilitycontext)中的属性获取。下面以获取沙箱文件路径为例。
......
......@@ -43,11 +43,11 @@ The specified ability name is not found.
**可能原因**<br/>
1. 输入的abilityName有误。
2. 系统中对应的应用没有安装
2. 系统中对应的应用不存在该abilityName对应的ability
**处理步骤**<br/>
1. 检查abilityName拼写是否正确。
2. 确认对应的应用是否安装该组件
2. 确认对应的应用是否存在该abilityName对应的ability
## 17700004 指定的用户不存在
......@@ -58,16 +58,17 @@ The specified user ID is not found.
调用与用户相关接口时,传入的用户不存在。
**可能原因**<br/>
输入的用户名有误,系统中没有该用户。
1. 输入的用户名有误。
2. 系统中没有该用户。
**处理步骤**<br/>
1. 检查用户名拼写是否正确。
2. 确认系统中存在该用户。
## 17700005 指定的appId不存在
## 17700005 指定的appId为空字符串
**错误信息**<br/>
The specified app ID is not found.
The specified app ID is empty string.
**错误描述**<br/>
调用appControl模块中的相关接口时,传入的appId为空字符串。
......@@ -144,9 +145,10 @@ Failed to install the HAP because the HAP signature fails to be verified.
4. 多个hap的签名信息不一致。
**处理步骤**<br/>
1. 确认hap是否签名成功。
2. 确认多个hap签名时使用的证书相同。
3. 确认升级的hap签名证书与已安装的hap相同。
1. 确认hap包是否签名成功。
2. 确认hap包的签名证书是从应用市场申请。
3. 确认多个hap包签名时使用的证书相同。
4. 确认升级的ha包p签名证书与已安装的hap包相同。
## 17700012 安装包路径无效或者文件过大导致应用安装失败
......@@ -175,7 +177,7 @@ Failed to install the HAPs because they have different configuration information
调用installer模块中的install接口时,多个HAP配置信息不同导致应用安装失败。
**可能原因**<br/>
多个HAP中配置文件app下面的字段不一致。
多个hap包中配置文件中app标签下面的字段信息不一致。
**处理步骤**<br/>
确认多个HAP中配置文件app下面的字段是否一致。
......@@ -206,7 +208,7 @@ Failed to install the HAP since the version of the HAP to install is too early.
新安装的应用版本号低于已安装的版本号。
**处理步骤**<br/>
确认新安装的应用版本号是否比已安装的同应用版本号高
确认新安装的应用版本号是否不低于已安装的同应用版本号
## 17700020 预置应用无法卸载
......@@ -299,7 +301,8 @@ The specified type is invalid.
2. 输入的type不存在。
**处理步骤**<br/>
确认输入的type是否拼写正确。
1. 确认输入的type是否拼写正确。
2. 确认输入的type是否存在。
## 17700026 指定应用被禁用
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册