From ad6b90af16f4c0115f2cd7c94b61be838d30f5c1 Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Mon, 23 Jun 2025 19:36:52 +0800 Subject: [PATCH] =?UTF-8?q?ArkTs=E8=BF=90=E8=A1=8C=E6=97=B6=E7=9A=84sample?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E5=B7=A5=E7=A8=8B=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangweiyuan --- .../ArkTSModule/DynamicImport/README.md | 68 +++++++++++-------- .../DynamicImport/build-profile.json5 | 6 +- .../DynamicImport/hvigor/hvigor-config.json5 | 2 +- .../DynamicImport/oh-package.json5 | 2 +- .../JsApisLoadNativeModule/README.md | 16 ++--- .../build-profile.json5 | 6 +- .../hvigor/hvigor-config.json5 | 2 +- .../JsApisLoadNativeModule/oh-package.json5 | 2 +- .../ArkTSModule/LazyImport/README.md | 32 ++++----- .../LazyImport/build-profile.json5 | 6 +- .../entry/src/main/ets/pages/main.ets | 4 +- .../src/ohosTest/ets/test/LazyImport.test.ets | 4 +- .../LazyImport/hvigor/hvigor-config.json5 | 2 +- .../ArkTSModule/LazyImport/oh-package.json5 | 2 +- .../ModuleLoadingSideEffects/README.md | 31 +++++---- .../build-profile.json5 | 6 +- .../hvigor/hvigor-config.json5 | 2 +- .../ModuleLoadingSideEffects/oh-package.json5 | 2 +- 18 files changed, 105 insertions(+), 90 deletions(-) diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/README.md b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/README.md index c5e1069415..27103e4d48 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/README.md +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/README.md @@ -10,8 +10,8 @@ ### 效果预览 -| 执行结果图 | -| ------------------------------------------------------------ | +| 执行结果图 | +| ---------------------------------------------------------------- | | | ### 使用说明 @@ -25,61 +25,73 @@ ``` entry/src/ ├── main + │ ├── cpp + │ │ ├── types + │ │ │ ├── libentry + │ │ │ │ ├── Index.d.ts // 提供JS侧的接口方法 + │ │ │ │ ├── oh-package.json5 // 将index.d.ts与cpp文件关联 + │ │ ├── CMakeLists.txt // 配置CMake打包参数 + │ │ ├── napi_init.cpp │ ├── ets │ │ ├── entryability │ │ ├── entrybackupability │ │ ├── pages - │ │ ├── Index.ets // 动态加载示例代码 + │ │ │ ├── Index.ets // 动态加载示例代码 + │ │ │ └── Calc.ets + │ │ ├── utils + │ │ └── Calc.ets + │ │ ├── Calc.ets │ ├── module.json5 │ └── resources ├── ohosTest │ ├── ets │ │ └── test - │ │ ├── Ability.test.ets + │ │ ├── Ability.test.ets │ │ ├── DynamicImport.test.ets // 自动化测试代码 │ │ └── List.test.ets - har1 // har1模块函数实现 + har1 // har1模块函数实现 ├── src │ ├── main │ │ ├── ets │ │ │ ├── utils - │ │ │ │ └── Calc.ets - │ │ │ └── components + │ │ │ │ └── Calc.ets + │ │ │ └── components │ │ │ │ └── MainPage.ets - har2 // har1模块函数实现 + ├── Index.ets + har2 // har2模块函数实现 ├── src │ ├── main │ │ ├── ets │ │ │ ├── utils - │ │ │ │ └── Calc.ets - │ │ │ └── components + │ │ │ │ └── Calc.ets + │ │ │ └── components │ │ │ │ └── MainPage.ets - ├── index.ets - harlibrary // harlibrary模块函数实现 + ├── Index.ets + harlibrary // harlibrary模块函数实现 ├── src │ ├── main │ │ ├── ets │ │ │ ├── utils - │ │ │ │ └── Calc.ets - │ │ │ └── components + │ │ │ │ └── Calc.ets + │ │ │ └── components │ │ │ │ └── MainPage.ets - ├── index.ets - myHar // myHar模块函数实现 + ├── Index.ets + myHar // myHar模块函数实现 ├── src │ ├── main - │ │ ├── ets - │ │ │ └── components + │ │ ├── ets + │ │ │ └── components │ │ │ │ └── MainPage.ets - ├── index.ets - myHsp // myHsp模块函数实现 + ├── Index.ets + myHsp // myHsp模块函数实现 ├── src │ ├── main - │ │ ├── ets - │ │ │ ├── pages + │ │ ├── ets + │ │ │ ├── pages │ │ │ │ └── Index.ets │ │ │ └── utils - │ │ │ │ └── Calc.ets - ├── index.ets + │ │ │ │ └── Calc.ets + ├── Index.ets ``` ### 相关权限 @@ -94,18 +106,18 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +2.本示例为Stage模型,支持API20版本SDK,版本号:6.0.0.34,镜像版本号:OpenHarmony_6.0.0.34。 -3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。 +3.本示例需要使用DevEco Studio 6.0.0及以上版本才可编译运行。 ### 下载 如需单独下载本工程,执行如下命令: -```` +``` git init git config core.sparsecheckout true echo code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/DynamicImport > .git/info/sparse-checkout git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master -```` \ No newline at end of file +``` diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/build-profile.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/build-profile.json5 index a8c3e30b26..2fe3b50e86 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/build-profile.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/build-profile.json5 @@ -20,9 +20,9 @@ { "name": "default", "signingConfig": "default", - "compileSdkVersion": 14, - "compatibleSdkVersion": 14, - "targetSdkVersion": 14, + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "targetSdkVersion": 20, "runtimeOS": "OpenHarmony", "buildOption": { "strictMode": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/hvigor/hvigor-config.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/hvigor/hvigor-config.json5 index cef74543b1..41416014a5 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/hvigor/hvigor-config.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/hvigor/hvigor-config.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.1", + "modelVersion": "6.0.0", "dependencies": { }, "execution": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/oh-package.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/oh-package.json5 index eaef52736f..f0e48242c9 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/oh-package.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/DynamicImport/oh-package.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.1", + "modelVersion": "6.0.0", "description": "Please describe the basic information.", "dependencies": { }, diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/README.md b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/README.md index e3ee2fcaaa..2003e72710 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/README.md +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/README.md @@ -8,8 +8,8 @@ ### 效果预览 -| 首页 | 点击HAP加载系统库模块按钮后 | 点击HAP加载Native库按钮后 | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| 首页 | 点击HAP加载系统库模块按钮后 | 点击HAP加载Native库按钮后 | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | | | | ### 使用说明 @@ -33,13 +33,13 @@ entry/src/ │ │ ├── entryability │ │ ├── entrybackupability │ │ ├── pages - │ │ ├── Index.ets // 同步方式动态加载native模块 + │ │ ├── Index.ets // 同步方式动态加载native模块 │ ├── module.json5 │ └── resources ├── ohosTest │ ├── ets │ │ └── test - │ │ ├── Ability.test.ets + │ │ ├── Ability.test.ets │ │ ├── JsApisLoadNativeModule.test.ets // 自动化测试代码 │ │ └── List.test ``` @@ -56,18 +56,18 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +2.本示例为Stage模型,支持API20版本SDK,版本号:6.0.0.34,镜像版本号:OpenHarmony_6.0.0.34。 -3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。 +3.本示例需要使用DevEco Studio 6.0.0及以上版本才可编译运行。 ### 下载 如需单独下载本工程,执行如下命令: -```` +``` git init git config core.sparsecheckout true echo code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule > .git/info/sparse-checkout git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master -```` \ No newline at end of file +``` diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/build-profile.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/build-profile.json5 index df8b8004f9..7c4f128306 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/build-profile.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/build-profile.json5 @@ -20,9 +20,9 @@ { "name": "default", "signingConfig": "default", - "compileSdkVersion": 14, - "compatibleSdkVersion": 14, - "targetSdkVersion": 14, + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "targetSdkVersion": 20, "runtimeOS": "OpenHarmony", "buildOption": { "strictMode": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/hvigor/hvigor-config.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/hvigor/hvigor-config.json5 index b839e93945..8335aa4055 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/hvigor/hvigor-config.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/hvigor/hvigor-config.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.0", + "modelVersion": "6.0.0", "dependencies": { }, "execution": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/oh-package.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/oh-package.json5 index 95bf2b62b5..40ca744c6d 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/oh-package.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/JsApisLoadNativeModule/oh-package.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.0", + "modelVersion": "6.0.0", "description": "Please describe the basic information.", "dependencies": { }, diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/README.md b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/README.md index 4f92135947..b7924346cf 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/README.md +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/README.md @@ -8,8 +8,8 @@ ### 效果预览 -| 首页 | 依次点击按钮后结果图 | -| ------------------------------------------------------------ | ------------------------------------------------------------ | +| 首页 | 依次点击按钮后结果图 | +| ------------------------------------------------------------- | ------------------------------------------------------------- | | | | ### 使用说明 @@ -27,21 +27,21 @@ entry/src/ │ │ ├── entryability │ │ ├── entrybackupability │ │ ├── pages - │ │ ├── A.ets - │ │ ├── A_ns.ets - │ │ ├── B.ets - │ │ ├── C.ets - │ │ ├── fail_example.ets - │ │ ├── Index.ets // 延迟加载 - │ │ ├── middle.ets - │ │ ├── mod1.ets - │ │ ├── mod2.ets + │ │ ├── A.ets + │ │ ├── A_ns.ets + │ │ ├── B.ets + │ │ ├── C.ets + │ │ ├── fail_example.ets + │ │ ├── main.ets // 延迟加载 + │ │ ├── middle.ets + │ │ ├── mod1.ets + │ │ ├── mod2.ets │ ├── module.json5 │ └── resources ├── ohosTest │ ├── ets │ │ └── test - │ │ ├── Ability.test.ets + │ │ ├── Ability.test.ets │ │ ├── LazyImport.test.ets // 自动化测试代码 │ │ └── List.test ``` @@ -58,18 +58,18 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +2.本示例为Stage模型,支持API20版本SDK,版本号:6.0.0.34,镜像版本号:OpenHarmony_6.0.0.34。 -3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。 +3.本示例需要使用DevEco Studio 6.0.0及以上版本才可编译运行。 ### 下载 如需单独下载本工程,执行如下命令: -```` +``` git init git config core.sparsecheckout true echo code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/LazyImport > .git/info/sparse-checkout git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master -```` \ No newline at end of file +``` diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/build-profile.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/build-profile.json5 index df8b8004f9..7c4f128306 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/build-profile.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/build-profile.json5 @@ -20,9 +20,9 @@ { "name": "default", "signingConfig": "default", - "compileSdkVersion": 14, - "compatibleSdkVersion": 14, - "targetSdkVersion": 14, + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "targetSdkVersion": 20, "runtimeOS": "OpenHarmony", "buildOption": { "strictMode": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/main/ets/pages/main.ets b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/main/ets/pages/main.ets index 31fe7cfc71..200e844963 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/main/ets/pages/main.ets +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/main/ets/pages/main.ets @@ -72,7 +72,7 @@ struct Index { console.info(res.c); }).catch((e: Error) => { hilog.error(0x0000, '[Sample_LazyImport]', 'Test Assert error: %{public}s', e.toString()); - this.message = 'Not advisable to use one error: ' + e.toString(); + this.message = 'Not advisable to use one error: ' + e.name; }) }) Button('Not advisable to use two') @@ -83,7 +83,7 @@ struct Index { console.info(res.ns.c); }).catch((e: Error) => { hilog.error(0x0000, '[Sample_LazyImport]', 'Test Assert error: %{public}s', e.toString()); - this.message = 'Not advisable to use two error: ' + e.toString(); + this.message = 'Not advisable to use two error: ' + e.name; }) }) Text(this.message) diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/ohosTest/ets/test/LazyImport.test.ets b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/ohosTest/ets/test/LazyImport.test.ets index f1288468bf..e239024bfc 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/ohosTest/ets/test/LazyImport.test.ets +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/entry/src/ohosTest/ets/test/LazyImport.test.ets @@ -59,11 +59,11 @@ export default function lazyImportTest() { await button4.click(); await driver.delayMs(1000); - await driver.assertComponentExist(ON.text('Not advisable to use one error: ReferenceError: c is not initialized')); + await driver.assertComponentExist(ON.text('Not advisable to use one error: ReferenceError')); await button5.click(); await driver.delayMs(1000); - await driver.assertComponentExist(ON.text('Not advisable to use two error: ReferenceError: module environment is undefined')); + await driver.assertComponentExist(ON.text('Not advisable to use two error: ReferenceError')); console.info('uitest: testLazyImport001 end'); done(); }) diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/hvigor/hvigor-config.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/hvigor/hvigor-config.json5 index f8c80644ca..8335aa4055 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/hvigor/hvigor-config.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/hvigor/hvigor-config.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.1", + "modelVersion": "6.0.0", "dependencies": { }, "execution": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/oh-package.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/oh-package.json5 index 7b54e25c41..40ca744c6d 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/oh-package.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/LazyImport/oh-package.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.1", + "modelVersion": "6.0.0", "description": "Please describe the basic information.", "dependencies": { }, diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/README.md b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/README.md index a62807bdc7..5e1af3594e 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/README.md +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/README.md @@ -10,8 +10,8 @@ ### 效果预览 -| 首页 | -| ------------------------------------------------------------ | +| 首页 | +| -------------------------------------------------------------------------- | | | ### 使用说明 @@ -29,19 +29,22 @@ entry/src/ │ │ ├── entryability │ │ ├── entrybackupability │ │ ├── pages - │ │ ├── LazyImportChangeExecutionOrder // 延迟加载改变模块执行顺序 - │ │ ├── ModifyGlobalObject // 修改全局对象 - │ │ ├── ModifyingGlobalVariables // 修改内置全局变量或原型链 - │ │ ├── ModifyTheApplicationLevelArkUI // 修改应用级ArkUI组件的状态变量信息 - │ │ ├── TopCodeModification // 模块执行顶层代码 - │ │ └── Index.ets // 首页 + │ │ | ├── LazyImportChangeExecutionOrder // 延迟加载改变模块执行顺序 + │ │ | ├── ModifyGlobalObject // 修改全局对象 + │ │ | ├── ModifyingGlobalVariables // 修改内置全局变量或原型链 + │ │ | ├── ModifyTheApplicationLevelArkUI // 修改应用级ArkUI组件的状态变量信息 + │ │ | ├── TopCodeModification // 模块执行顶层代码 + │ │ | └── Index.ets // 首页 + │ │ ├── util + │ │ ├── CommonButton.ets + │ │ └── resource.ets │ ├── module.json5 │ └── resources ├── ohosTest │ ├── ets │ │ └── test - │ │ ├── Ability.test.ets - │ │ ├── ModuleLoadingSideEffects.test.ets // 自动化测试代码 + │ │ ├── Ability.test.ets + │ │ ├── ModuleLoadingSideEffects.test.ets // 自动化测试代码 │ │ └── List.test ``` @@ -57,18 +60,18 @@ entry/src/ 1.本示例仅支持标准系统上运行, 支持设备:RK3568。 -2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 +2.本示例为Stage模型,支持API20版本SDK,版本号:6.0.0.34,镜像版本号:OpenHarmony_6.0.0.34。 -3.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。 +3.本示例需要使用DevEco Studio 6.0.0及以上版本才可编译运行。 ### 下载 如需单独下载本工程,执行如下命令: -```` +``` git init git config core.sparsecheckout true echo code/DocsSample/ArkTs/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects > .git/info/sparse-checkout git remote add origin https://gitee.com/openharmony/applications_app_samples.git git pull origin master -```` \ No newline at end of file +``` diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/build-profile.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/build-profile.json5 index df8b8004f9..7c4f128306 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/build-profile.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/build-profile.json5 @@ -20,9 +20,9 @@ { "name": "default", "signingConfig": "default", - "compileSdkVersion": 14, - "compatibleSdkVersion": 14, - "targetSdkVersion": 14, + "compileSdkVersion": 20, + "compatibleSdkVersion": 20, + "targetSdkVersion": 20, "runtimeOS": "OpenHarmony", "buildOption": { "strictMode": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/hvigor/hvigor-config.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/hvigor/hvigor-config.json5 index cef74543b1..41416014a5 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/hvigor/hvigor-config.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/hvigor/hvigor-config.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.1", + "modelVersion": "6.0.0", "dependencies": { }, "execution": { diff --git a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/oh-package.json5 b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/oh-package.json5 index eaef52736f..f0e48242c9 100755 --- a/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/oh-package.json5 +++ b/code/DocsSample/ArkTS/ArkTSRuntime/ArkTSModule/ModuleLoadingSideEffects/oh-package.json5 @@ -14,7 +14,7 @@ */ { - "modelVersion": "5.0.1", + "modelVersion": "6.0.0", "description": "Please describe the basic information.", "dependencies": { }, -- Gitee