diff --git a/zh-cn/application-dev/application-models/create-pageability.md b/zh-cn/application-dev/application-models/create-pageability.md index e502fc2be29ef3d09e58aa416cf5bdcbc731c035..c943dceb878d97e47aca376852967bf5ebb957b8 100644 --- a/zh-cn/application-dev/application-models/create-pageability.md +++ b/zh-cn/application-dev/application-models/create-pageability.md @@ -76,22 +76,22 @@ FA模型中,可以通过featureAbility的getContext接口获取应用上下文 通过getContext获取应用上下文并获取分布式目录的示例如下: ```ts -import featureAbility from '@ohos.ability.featureAbility' -import fileIo from '@ohos.fileio' +import featureAbility from '@ohos.ability.featureAbility'; +import fs from '@ohos.file.fs'; (async () => { - let dir: string + let dir: string; try { - console.info('Begin to getOrCreateDistributedDir') - dir = await featureAbility.getContext().getOrCreateDistributedDir() + console.info('Begin to getOrCreateDistributedDir'); + dir = await featureAbility.getContext().getOrCreateDistributedDir(); console.info('distribute dir is ' + dir) } catch (error) { - console.error('getOrCreateDistributedDir failed with ' + error) + console.error('getOrCreateDistributedDir failed with ' + error); } let fd: number; let path = dir + "/a.txt"; - fd = fileIo.openSync(path, 0o2 | 0o100, 0o666); - fileIo.close(fd); + fd = fs.openSync(path, fs.OpenMode.READ_WRITE).fd; + fs.close(fd); })() ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md index f0fef9e181f119b105b86f3a3d072b3362f77e05..0dd44d5b879a005afac77a3b65bd5d98793fb6fa 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-want.md @@ -109,10 +109,10 @@ import Want from '@ohos.app.ability.Want'; ``` * 文件描述符(FD) ```ts - import fileio from '@ohos.fileio'; + import fs from '@ohos.file.fs'; let fd; try { - fd = fileio.openSync('/data/storage/el2/base/haps/pic.png'); + fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd; } catch(e) { console.log('openSync fail:' + JSON.stringify(e)); } diff --git a/zh-cn/application-dev/reference/apis/js-apis-application-want.md b/zh-cn/application-dev/reference/apis/js-apis-application-want.md index 7d6de5e4edf2a5913f4f61cf0b34882ab137eac7..50d0f58165aa923b9b15b6ecafad9709a4a0e0e2 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-application-want.md +++ b/zh-cn/application-dev/reference/apis/js-apis-application-want.md @@ -108,10 +108,10 @@ import Want from '@ohos.application.Want'; ``` * 文件描述符(FD) ```ts - import fileio from '@ohos.fileio'; + import fs from '@ohos.file.fs'; let fd; try { - fd = fileio.openSync('/data/storage/el2/base/haps/pic.png'); + fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd; } catch(e) { console.log('openSync fail:' + JSON.stringify(e)); } diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md index eb39f0e4988158512dc3fea3f20c23f4691d2e06..f408cfa6e6e8d6dad4e6970fade58979b82a3e36 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-ability-want.md @@ -41,12 +41,12 @@ Want是对象间信息传递的载体, 可以用于应用组件间的信息传 - 传递FD(文件描述符)数据(在UIAbility对象中调用,其中示例中的context为UIAbility的上下文对象) ```ts - import fileio from '@ohos.fileio';; + import fs from '@ohos.file.fs'; // ... let fd; try { - fd = fileio.openSync('/data/storage/el2/base/haps/pic.png'); + fd = fs.openSync('/data/storage/el2/base/haps/pic.png').fd; } catch(e) { console.log('openSync fail:' + JSON.stringify(e)); } diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md index 4f9580d7b0791455b2efcb55d263e2389a7a2e04..86e185e2e7308d2780018c333806d70e934f2394 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-serviceExtensionContext.md @@ -55,6 +55,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void; | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -128,6 +129,7 @@ startAbility(want: Want, options?: StartOptions): Promise\; | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -199,6 +201,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void& | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -277,6 +280,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -354,6 +358,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -440,6 +445,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): | 16000009 | Can not start ability in wukong mode. | | 16000010 | Can not operation with continue flag. | | 16000011 | Context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000051 | Network error. The network is abnormal. | | 16000052 | Free install not support. The application does not support freeinstall | | 16000053 | Not top ability. The application is not top ability. | @@ -1348,6 +1354,7 @@ startAbilityByCall(want: Want): Promise<Caller>; | 16000007 | Service busyness. There are concurrent tasks, waiting for retry. | | 16000008 | Crowdtest App Expiration. | | 16000009 | Can not start ability in wukong mode. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal Error. | **示例:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md index 6999d6b19fb0538df4b2fdddd199656b963f6b66..65e971c4f5fd307c9c10095040d1d395c749a72a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-application-uiAbilityContext.md @@ -52,6 +52,7 @@ startAbility(want: Want, callback: AsyncCallback<void>): void; | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -118,6 +119,7 @@ startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void& | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -192,6 +194,7 @@ startAbility(want: Want, options?: StartOptions): Promise<void>; | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -263,6 +266,7 @@ startAbilityForResult(want: Want, callback: AsyncCallback<AbilityResult>): | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -333,6 +337,7 @@ startAbilityForResult(want: Want, options: StartOptions, callback: AsyncCallback | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -413,6 +418,7 @@ startAbilityForResult(want: Want, options?: StartOptions): Promise<AbilityRes | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -480,6 +486,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, callback: AsyncC | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -549,6 +556,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options: StartOp | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -626,6 +634,7 @@ startAbilityForResultWithAccount(want: Want, accountId: number, options?: StartO | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1583,6 +1592,7 @@ startAbilityByCall(want: Want): Promise<Caller>; | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1688,6 +1698,7 @@ startAbilityWithAccount(want: Want, accountId: number, callback: AsyncCallback\< | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1756,6 +1767,7 @@ startAbilityWithAccount(want: Want, accountId: number, options: StartOptions, ca | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | @@ -1826,6 +1838,7 @@ startAbilityWithAccount(want: Want, accountId: number, options?: StartOptions): | 16000009 | An ability cannot be started or stopped in Wukong mode. | | 16000010 | The call with the continuation flag is forbidden. | | 16000011 | The context does not exist. | +| 16000017 | The previous ability is starting, wait start later. | | 16000050 | Internal error. | | 16000053 | The ability is not on the top of the UI. | | 16000055 | Installation-free timed out. | diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md index b0bdef10a115dd44e2aab2c2142bdf6e7f262411..f22839136d0862f5eafc4ca8662bd0ac981e1e7d 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-ability.md @@ -186,6 +186,24 @@ Context does not exist. 请检查上下文对象是否可用。 +## 16000017 上一个Ability未启动完成,先缓存在队列中等待后续启动。 + +**错误信息** + +The previous ability is starting, wait start later. + +**错误描述** + +需要启动的Ability过多,由于系统处理能力有限,会先将请求缓存在队列中,按照顺序依次处理。 + +**可能原因** + +系统并发大。 + +**处理步骤** + +无需处理,等待启动即可。 + ## 16000050 内部错误 **错误信息**