From 0f0edb99de9ff89366ee4db4aebf33da8092926d Mon Sep 17 00:00:00 2001 From: huangxiaoyao <976125628@qq.com> Date: Wed, 11 Dec 2024 20:27:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=EF=BC=9AHarmonyOS=E6=9B=BF=E6=8D=A2=E6=88=90OpenHarmony?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangxiaoyao <976125628@qq.com> --- ohos/docs/03_environment/README_EN.md | 4 +-- ... openharmony-flutter-environment-setup.md} | 26 +++++++++--------- ...55\345\273\272\346\214\207\345\257\274.md" | 4 +-- ohos/docs/04_development/README_EN.md | 4 +-- .../04_development/developing-a-module.md | 4 +-- ...ayer-rendering-adaptation-and-switching.md | 4 +-- .../using-a-flutter-platform-channel.md | 2 +- .../04_development/using-a-platform-view.md | 2 +- ohos/docs/04_development/using-flutterpage.md | 4 +-- ohos/docs/05_performance/README_EN.md | 2 +- ohos/docs/06_debug/debugging-dart-code.md | 2 +- ...developing-an-ohos-plugin-using-flutter.md | 4 +-- ...71\345\272\223\346\214\207\345\257\274.md" | 4 +-- ohos/docs/08_FAQ/README.md | 2 +- ohos/docs/08_FAQ/README_EN.md | 6 ++-- .../docs/08_FAQ/flutter-cppcrash-guideline.md | 2 +- .../08_FAQ/ohos-application-compilation.md | 2 +- .../08_FAQ/ohos-engine-product-compilation.md | 4 +-- ohos/docs/08_FAQ/ohos-run.md | 4 +-- ...70\345\205\263\351\227\256\351\242\230.md" | 2 +- ...70\345\205\263\351\227\256\351\242\230.md" | 2 +- ...32\204cppcrash\345\240\206\346\240\210.md" | 2 +- ohos/docs/09_specifications/README_EN.md | 2 +- ...ure-of-the-openharmony-flutter-project.md} | 4 +-- .../update-flutter-plugin-structure.md | 2 +- ...ng => 03_OpenHarmony_plugin_structure.png} | Bin ...hos_project_in_the_OpenHarmony_plugin.png} | Bin 27 files changed, 50 insertions(+), 50 deletions(-) rename ohos/docs/03_environment/{harmonyos-flutter-environment-setup.md => openharmony-flutter-environment-setup.md} (89%) rename ohos/docs/09_specifications/{directory-structure-of-the-harmonyos-flutter-project.md => directory-structure-of-the-openharmony-flutter-project.md} (91%) rename ohos/docs/media/07_1/{03_HarmonyOS_plugin_structure.png => 03_OpenHarmony_plugin_structure.png} (100%) rename ohos/docs/media/07_1/{05_The_ohos_project_in_the_HarmonyOS_plugin.png => 05_The_ohos_project_in_the_OpenHarmony_plugin.png} (100%) diff --git a/ohos/docs/03_environment/README_EN.md b/ohos/docs/03_environment/README_EN.md index e1e28768..84f41f20 100644 --- a/ohos/docs/03_environment/README_EN.md +++ b/ohos/docs/03_environment/README_EN.md @@ -1,5 +1,5 @@ # Environment Setup -## HarmonyOS Flutter Integration and Compilation Tutorial -1. [HarmonyOS Flutter Environment Setup](./harmonyos-flutter-environment-setup.md) +## OpenHarmony Flutter Integration and Compilation Tutorial +1. [OpenHarmony Flutter Environment Setup](./openharmony-flutter-environment-setup.md) diff --git a/ohos/docs/03_environment/harmonyos-flutter-environment-setup.md b/ohos/docs/03_environment/openharmony-flutter-environment-setup.md similarity index 89% rename from ohos/docs/03_environment/harmonyos-flutter-environment-setup.md rename to ohos/docs/03_environment/openharmony-flutter-environment-setup.md index 5d9b8e97..0cbcacb2 100644 --- a/ohos/docs/03_environment/harmonyos-flutter-environment-setup.md +++ b/ohos/docs/03_environment/openharmony-flutter-environment-setup.md @@ -1,4 +1,4 @@ -# HarmonyOS Flutter Environment Setup +# OpenHarmony Flutter Environment Setup ## Environment Preparation @@ -22,10 +22,10 @@ Official download address of the Harmony development suite: https://developer.hu ![](../media/03_1/img_17_EN.png) -##### (2) Download an emulator in DevEco Studio if no real HarmonyOS device is available. +##### (2) Download an emulator in DevEco Studio if no real OpenHarmony device is available. For details about how to download and install the emulator, see section 2.2 "Install an emulator." -##### (3) Download HarmonyOS Flutter. +##### (3) Download OpenHarmony Flutter. Project URL: https://gitee.com/openharmony-sig/flutter_flutter @@ -44,7 +44,7 @@ Use a code editor to download the repository to your local PC and specify the de ![](../media/03_1/img_4_EN.png) #### 1.3 Preinstalled Environment Dependencies -* The HarmonyOS SDK requires the Java environment. You can download JDK 17 from the [Oracle website](https://www.oracle.com/java/technologies/downloads/#java17) or OpenJDK website and set up the environment. +* The OpenHarmony SDK requires the Java environment. You can download JDK 17 from the [Oracle website](https://www.oracle.com/java/technologies/downloads/#java17) or OpenJDK website and set up the environment. * Execute the following instruction to check the JDK installation result: ```sh @@ -95,13 +95,13 @@ Use a code editor to download the repository to your local PC and specify the de # flutter_flutter/bin directory pulled from Flutter pub export PATH=/Users/admin/ohos/flutter_flutter/bin:$PATH - # HamonyOS SDK + # OpenHarmony SDK export TOOL_HOME=/Applications/DevEco-Studio.app/Contents # macOS environment export DEVECO_SDK_HOME=$TOOL_HOME/sdk # command-line-tools/sdk export PATH=$TOOL_HOME/tools/ohpm/bin:$PATH # command-line-tools/ohpm/bin export PATH=$TOOL_HOME/tools/hvigor/bin:$PATH # command-line-tools/hvigor/bin export PATH=$TOOL_HOME/tools/node/bin:$PATH # command-line-tools/tool/node/bin - export HDC_HOME=$TOOL_HOME/sdk/HarmonyOS-NEXT-DB1/openharmony/toolchains # (Optional) hdc instruction + export HDC_HOME=$TOOL_HOME/sdk/default/openharmony/toolchains # (Optional) hdc instruction # Optional configuration items (required when using the Android Studio or Visual Studio Code to debug. The JDK version is 17.0.12) JAVA_HOME=/Users/admin/Documents/JDK/jdk-17.0.12.jdk/Contents/Home @@ -109,7 +109,7 @@ Use a code editor to download the repository to your local PC and specify the de export JAVA_HOME export PATH - # Optional configuration item (to prevent the creation of subsequent Flutter projects from being affected by the mismatched environment variable of the Gitee download URL for HarmonyOS Flutter) + # Optional configuration item (to prevent the creation of subsequent Flutter projects from being affected by the mismatched environment variable of the Gitee download URL for OpenHarmony Flutter) export FLUTTER_GIT_URL=https://gitee.com/openharmony-sig/flutter_flutter.git # Optional configuration item (required only when there is no node environment in the tool file under the command-line-tools directory) @@ -140,7 +140,7 @@ Emulator running effect ![](../media/03_1/m3_EN.png) -## HarmonyOS Flutter Integration and Debugging +## OpenHarmony Flutter Integration and Debugging ### 1. Checking the Environment Run `flutter doctor -v` to check whether the environment variable configuration is correct. The check results for both Flutter and OpenHarmony should be **ok**. If there are any prompts indicating missing environment variable configuration, follow the prompts to configure the environment. @@ -162,7 +162,7 @@ flutter create flutter build hap --debug ``` -### 3. Running the Flutter Project on a Real HarmonyOS Device +### 3. Running the Flutter Project on a Real OpenHarmony Device #### 3.1 Sign the project. Before running the project on a real device, you need to sign the project. Steps are as follows. ![](../media/03_1/sign01.png) @@ -171,13 +171,13 @@ Before running the project on a real device, you need to sign the project. Steps #### 3.2 Run the project on a real device. * Execute the `flutter devices` instruction to discover a real device and obtain the device ID. - Method 1: Go to the project directory, compile the HAP in the specified build mode, and install it on the HarmonyOS device. + Method 1: Go to the project directory, compile the HAP in the specified build mode, and install it on the OpenHarmony device. ```sh flutter run --debug -d ``` - Method 2: Go to the project root directory, compile the HAP, and install it on the HarmonyOS device. + Method 2: Go to the project root directory, compile the HAP, and install it on the OpenHarmony device. ```sh flutter build hap --debug @@ -193,7 +193,7 @@ Before running the project on a real device, you need to sign the project. Steps ![](../media/03_1/open_ohos.png) -#### 4.2 Start the HarmonyOS emulator in DevEco Studio. +#### 4.2 Start the OpenHarmony emulator in DevEco Studio. ![](../media/03_1/m1_EN.png) @@ -201,7 +201,7 @@ Before running the project on a real device, you need to sign the project. Steps ![](../media/03_1/m3_EN.png) -Switch to the HarmonyOS emulator. +Switch to the OpenHarmony emulator. ![](../media/03_1/img00_EN.png) diff --git "a/ohos/docs/03_environment/\351\270\277\350\222\231\347\211\210Flutter\347\216\257\345\242\203\346\220\255\345\273\272\346\214\207\345\257\274.md" "b/ohos/docs/03_environment/\351\270\277\350\222\231\347\211\210Flutter\347\216\257\345\242\203\346\220\255\345\273\272\346\214\207\345\257\274.md" index baffb1dd..02d15cce 100644 --- "a/ohos/docs/03_environment/\351\270\277\350\222\231\347\211\210Flutter\347\216\257\345\242\203\346\220\255\345\273\272\346\214\207\345\257\274.md" +++ "b/ohos/docs/03_environment/\351\270\277\350\222\231\347\211\210Flutter\347\216\257\345\242\203\346\220\255\345\273\272\346\214\207\345\257\274.md" @@ -84,13 +84,13 @@ export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn # 拉取下来的flutter_flutter/bin目录 export PATH=/Users/admin/ohos/flutter_flutter/bin:$PATH -# HamonyOS SDK +# OpenHarmony SDK export TOOL_HOME=/Applications/DevEco-Studio.app/Contents # mac环境 export DEVECO_SDK_HOME=$TOOL_HOME/sdk # command-line-tools/sdk export PATH=$TOOL_HOME/tools/ohpm/bin:$PATH # command-line-tools/ohpm/bin export PATH=$TOOL_HOME/tools/hvigor/bin:$PATH # command-line-tools/hvigor/bin export PATH=$TOOL_HOME/tools/node/bin:$PATH # command-line-tools/tool/node/bin -export HDC_HOME=$TOOL_HOME/sdk/HarmonyOS-NEXT-DB1/openharmony/toolchains # hdc指令(可选) +export HDC_HOME=$TOOL_HOME/sdk/default/openharmony/toolchains # hdc指令(可选) # 可选配置项(使用Android Studio 或者 Visual Studio Code调试时需要配置此项,jdk版本为17.0.12) JAVA_HOME=/Users/admin/Documents/JDK/jdk-17.0.12.jdk/Contents/Home diff --git a/ohos/docs/04_development/README_EN.md b/ohos/docs/04_development/README_EN.md index da1263e4..a6705b7f 100644 --- a/ohos/docs/04_development/README_EN.md +++ b/ohos/docs/04_development/README_EN.md @@ -1,11 +1,11 @@ # Feature Development -## Adding a Flutter Page to Your HarmonyOS Application +## Adding a Flutter Page to Your OpenHarmony Application 1. [Using FlutterPage](./using-flutterpage.md) 2. [Using FlutterEntry](./using-flutterentry.md) -## Using a Flutter Platform Channel in Your HarmonyOS Application +## Using a Flutter Platform Channel in Your OpenHarmony Application 1. [Using a Flutter Platform Channel](./using-a-flutter-platform-channel.md) diff --git a/ohos/docs/04_development/developing-a-module.md b/ohos/docs/04_development/developing-a-module.md index 5156e45b..d37ca5c4 100644 --- a/ohos/docs/04_development/developing-a-module.md +++ b/ohos/docs/04_development/developing-a-module.md @@ -2,7 +2,7 @@ This topic describes how to reference a flutter_module project in an ohos project. -- ohos project: a native HarmonyOS project that can be created by DevEco Studio. +- ohos project: a native OpenHarmony project that can be created by DevEco Studio. - flutter_module project: a Flutter submodule project that can be created by executing Flutter instructions. ## Environment Setup @@ -10,7 +10,7 @@ This topic describes how to reference a flutter_module project in an ohos projec - Use [flutter_flutter](https://gitee.com/openharmony-sig/flutter_flutter) to configure environment variables. - Use the engine products generated by [flutter_engine](https://gitee.com/openharmony-sig/flutter_engine). -Use DevEco Studio to create a native HarmonyOS project named **MyApplication**. +Use DevEco Studio to create a native OpenHarmony project named **MyApplication**. ## flutter_module Project Operations diff --git a/ohos/docs/04_development/platform-view-same-layer-rendering-adaptation-and-switching.md b/ohos/docs/04_development/platform-view-same-layer-rendering-adaptation-and-switching.md index a0d0cc3f..0949a489 100644 --- a/ohos/docs/04_development/platform-view-same-layer-rendering-adaptation-and-switching.md +++ b/ohos/docs/04_development/platform-view-same-layer-rendering-adaptation-and-switching.md @@ -30,7 +30,7 @@ export struct DynamicView{ @BuilderParam customBuilder?:($$:BuilderParams)=>void; } ``` -Use JSON strings to define and generate a DVModel and implement the PlatformView. Place the FlutterView at the bottom layer and the PlatformView implemented by the DynamicView at the top layer. The DynamicView, implemented using ArkUI, is a native rendering product of HarmonyOS. +Use JSON strings to define and generate a DVModel and implement the PlatformView. Place the FlutterView at the bottom layer and the PlatformView implemented by the DynamicView at the top layer. The DynamicView, implemented using ArkUI, is a native rendering product of OpenHarmony. ```java build() { Stack() { @@ -67,7 +67,7 @@ There are two major defects when a Flutter page is embedded into the PlatformVie ## New Solution ### Overview -The NodeContainer is introduced for same-layer rendering, so that textures of native components can be registered with the Flutter engine and rendered by Flutter. The solution can solve the inherent defects of the old solution. In addition, the PlatformView uses the custom ArkUI component, which complies with the native HarmonyOS application development habits. You are no longer restricted by the DVModel and can get prompts when compiling JSON strings. +The NodeContainer is introduced for same-layer rendering, so that textures of native components can be registered with the Flutter engine and rendered by Flutter. The solution can solve the inherent defects of the old solution. In addition, the PlatformView uses the custom ArkUI component, which complies with the native OpenHarmony application development habits. You are no longer restricted by the DVModel and can get prompts when compiling JSON strings. ```java build() { Stack() { diff --git a/ohos/docs/04_development/using-a-flutter-platform-channel.md b/ohos/docs/04_development/using-a-flutter-platform-channel.md index 6afae415..0d4ffeff 100644 --- a/ohos/docs/04_development/using-a-flutter-platform-channel.md +++ b/ohos/docs/04_development/using-a-flutter-platform-channel.md @@ -1,6 +1,6 @@ # Using a Flutter Platform Channel -This topic describes how to use a Flutter platform channel in the HarmonyOS Flutter project. +This topic describes how to use a Flutter platform channel in the OpenHarmony Flutter project. The following are the key implementation codes. For details about the complete demo, see [channel_demo](https://gitee.com/openharmony-sig/flutter_samples/tree/master/ohos/channel_demo). diff --git a/ohos/docs/04_development/using-a-platform-view.md b/ohos/docs/04_development/using-a-platform-view.md index 03fea8bd..5425f434 100644 --- a/ohos/docs/04_development/using-a-platform-view.md +++ b/ohos/docs/04_development/using-a-platform-view.md @@ -169,7 +169,7 @@ export class CustomPlugin implements FlutterPlugin { } ``` -​ 3.6 Open the EntryAbility.ets file and add the plugin. (Alternatively, implement the custom platform view in a HarmonyOS plugin and use it in the application. If this is the case, you do not need to add the plugin explicitly.) +​ 3.6 Open the EntryAbility.ets file and add the plugin. (Alternatively, implement the custom platform view in a OpenHarmony plugin and use it in the application. If this is the case, you do not need to add the plugin explicitly.) ```ts import { FlutterAbility } from '@ohos/flutter_ohos' diff --git a/ohos/docs/04_development/using-flutterpage.md b/ohos/docs/04_development/using-flutterpage.md index d36b4d3b..d8d1d8ea 100644 --- a/ohos/docs/04_development/using-flutterpage.md +++ b/ohos/docs/04_development/using-flutterpage.md @@ -1,6 +1,6 @@ # Using FlutterPage -## 1. Adding a Page to Your HarmonyOS Application +## 1. Adding a Page to Your OpenHarmony Application 1. Use DevEco Studio to open the ohos project. 2. Right-click **ohos/entry/src/main/ets/pages** directory and choose **New** > **Page** > **Empty Page** from the shortcut menu. @@ -17,7 +17,7 @@ export default class EntryAbility extends FlutterAbility { } ``` -## 3. Using FlutterPage in the HarmonyOS Application +## 3. Using FlutterPage in the OpenHarmony Application ```ts let storage = LocalStorage.getShared() diff --git a/ohos/docs/05_performance/README_EN.md b/ohos/docs/05_performance/README_EN.md index 821a440c..8fc9cafc 100644 --- a/ohos/docs/05_performance/README_EN.md +++ b/ohos/docs/05_performance/README_EN.md @@ -1,6 +1,6 @@ # Performance Tuning -For a HarmonyOS Flutter project, you can use DevTools to debug the Dart code. For details, see [Flutter and Dart DevTools](https://docs.flutter.dev/tools/devtools). +For a OpenHarmony Flutter project, you can use DevTools to debug the Dart code. For details, see [Flutter and Dart DevTools](https://docs.flutter.dev/tools/devtools). [Performance Analysis Demarcation Guide](./performance-delimitation.md) diff --git a/ohos/docs/06_debug/debugging-dart-code.md b/ohos/docs/06_debug/debugging-dart-code.md index 67cc5a89..14d4871c 100644 --- a/ohos/docs/06_debug/debugging-dart-code.md +++ b/ohos/docs/06_debug/debugging-dart-code.md @@ -2,7 +2,7 @@ - Use DevEco Studio to debug ets code. - Use VS Code and Android Studio to debug dart code. - - You need to add the parameters, for example, `--local-engine=/Users/xxx/ohos/engine/src/out/ohos_debug_unopt_arm64`, when debugging the HarmonyOS Fluffer project. + - You need to add the parameters, for example, `--local-engine=/Users/xxx/ohos/engine/src/out/ohos_debug_unopt_arm64`, when debugging the OpenHarmony Fluffer project. ## Using VS Code to Debug Dart Code diff --git a/ohos/docs/07_plugin/developing-an-ohos-plugin-using-flutter.md b/ohos/docs/07_plugin/developing-an-ohos-plugin-using-flutter.md index e31ea526..ab4caa21 100644 --- a/ohos/docs/07_plugin/developing-an-ohos-plugin-using-flutter.md +++ b/ohos/docs/07_plugin/developing-an-ohos-plugin-using-flutter.md @@ -44,7 +44,7 @@ Before creating the module, the plugin structure is as below. After creating the module, you can delete the **.dart_tool** and **.ldea** files from the **path_provider_ohos** directory. -![image-20240410105254011](../media/07_1/03_HarmonyOS_plugin_structure.png) +![image-20240410105254011](../media/07_1/03_OpenHarmony_plugin_structure.png) @@ -105,7 +105,7 @@ Steps: (1) Use DevEco Studio to open the ohos project in the **path_provider_ohos** directory. -![image-20240410105254011](../media/07_1/05_The_ohos_project_in_the_HarmonyOS_plugin.png) +![image-20240410105254011](../media/07_1/05_The_ohos_project_in_the_OpenHarmony_plugin.png) (2) Create a static module named **path_provider**. diff --git "a/ohos/docs/07_plugin/ohos\345\271\263\345\217\260\351\200\202\351\205\215flutter\344\270\211\346\226\271\345\272\223\346\214\207\345\257\274.md" "b/ohos/docs/07_plugin/ohos\345\271\263\345\217\260\351\200\202\351\205\215flutter\344\270\211\346\226\271\345\272\223\346\214\207\345\257\274.md" index 665b1e81..439cecaf 100644 --- "a/ohos/docs/07_plugin/ohos\345\271\263\345\217\260\351\200\202\351\205\215flutter\344\270\211\346\226\271\345\272\223\346\214\207\345\257\274.md" +++ "b/ohos/docs/07_plugin/ohos\345\271\263\345\217\260\351\200\202\351\205\215flutter\344\270\211\346\226\271\345\272\223\346\214\207\345\257\274.md" @@ -44,7 +44,7 @@ LICENSE: 包含软件包许可条款的文件。 执行创建命令后,可以将path_provider_ohos目录下的.dart_tool和.ldea文件删除。 -![image-20240410105254011](../media/07_1/03_HarmonyOS_plugin_structure.png) +![image-20240410105254011](../media/07_1/03_OpenHarmony_plugin_structure.png) @@ -105,7 +105,7 @@ dev_dependencies: 1)用DevEco Studio打开path_provider_ohos下的ohos项目: -![image-20240410105254011](../media/07_1/05_The_ohos_project_in_the_HarmonyOS_plugin.png) +![image-20240410105254011](../media/07_1/05_The_ohos_project_in_the_OpenHarmony_plugin.png) 2)新建一个名称为path_provider的静态模块: diff --git a/ohos/docs/08_FAQ/README.md b/ohos/docs/08_FAQ/README.md index afb181b5..96acb44f 100644 --- a/ohos/docs/08_FAQ/README.md +++ b/ohos/docs/08_FAQ/README.md @@ -28,7 +28,7 @@ 2. `flutter run -d $DEVICE --debug > run.log 2>&1` 2. hilog日志文件 1. 可通过命令导出到文件 `hdc hilog > hilog.log 2>&1` - 2. `hdc` 工具在 HarmonyOS SDK 中的 toolchains 目录下 + 2. `hdc` 工具在 OpenHarmony SDK 中的 toolchains 目录下 3. 闪退日志文件 1. 可在DevEco-Studio中获取, "DevEco-Studio -> Log -> FaultLog -> 应用包名 -> cppcrash/jscrash -> 时间点 -> 鼠标右键导出日志文件" diff --git a/ohos/docs/08_FAQ/README_EN.md b/ohos/docs/08_FAQ/README_EN.md index 258e208c..2757a7d4 100644 --- a/ohos/docs/08_FAQ/README_EN.md +++ b/ohos/docs/08_FAQ/README_EN.md @@ -1,6 +1,6 @@ # FAQs -You can refer to FAQs related to the following aspects during HarmonyOS Flutter development. +You can refer to FAQs related to the following aspects during OpenHarmony Flutter development. 1. [Environment](./environment.md) 2. [ohos Engine Product Compilation](./ohos-engine-product-compilation.md) @@ -10,11 +10,11 @@ You can refer to FAQs related to the following aspects during HarmonyOS Flutter 6. [ohos Development](../04_development/README.md) 7. [Parsing Flutter-Related CppCrash Stacks](./flutter-cppcrash-guideline.md) -## Key Information Template for Feedback on Questions Related to HarmonyOS Flutter Application +## Key Information Template for Feedback on Questions Related to OpenHarmony Flutter Application 1. IDE version number. Example: 1. DevEco Studio 5.0.3.300 -2. Device name and system version number of the HarmonyOS device or emulator. You can check them in **Settings** > **About phone**. Example: +2. Device name and system version number of the OpenHarmony device or emulator. You can check them in **Settings** > **About phone**. Example: 1. HUAWEI Mate 60 Pro, 3.0.0.22(SP81xxxxxx) 2. Emulator, 3.0.0.22(SP39xxxxxx) 3. Information about the Flutter runtime environment. Example: diff --git a/ohos/docs/08_FAQ/flutter-cppcrash-guideline.md b/ohos/docs/08_FAQ/flutter-cppcrash-guideline.md index a4b4b968..a6f6a25e 100644 --- a/ohos/docs/08_FAQ/flutter-cppcrash-guideline.md +++ b/ohos/docs/08_FAQ/flutter-cppcrash-guideline.md @@ -8,7 +8,7 @@ The `llvm-addr2line` tool can convert instruction addresses and executable image ## 2. Tool Location -The `llvm-addr2line` tool is included in the SDK directory of both **DevEco Studio** and **Command Line Tools for HarmonyOS**. The paths are as follows: +The `llvm-addr2line` tool is included in the SDK directory of both **DevEco Studio** and **Command Line Tools for OpenHarmony**. The paths are as follows: - Windows: `sdk/default/openharmony/native/llvm/bin/llvm-addr2line.exe` - Linux/Mac: `sdk/default/openharmony/native/llvm/bin/llvm-addr2line` diff --git a/ohos/docs/08_FAQ/ohos-application-compilation.md b/ohos/docs/08_FAQ/ohos-application-compilation.md index ebed0691..ea90e998 100644 --- a/ohos/docs/08_FAQ/ohos-application-compilation.md +++ b/ohos/docs/08_FAQ/ohos-application-compilation.md @@ -2,7 +2,7 @@ ## Configure aliases to simplify compilation instructions during routine development. -Configure aliases in the configuration file of the environment variables to simplify the instructions used for HarmonyOS Flutter. +Configure aliases in the configuration file of the environment variables to simplify the instructions used for OpenHarmony Flutter. - For Windows, use `Git Bash` to execute common Linux instructions. (How to use: Right-click the blank area in the file manager and choose **Git Bash Here** from the shortcut menu.) - For Linux, modify `~/.bash_profile`. diff --git a/ohos/docs/08_FAQ/ohos-engine-product-compilation.md b/ohos/docs/08_FAQ/ohos-engine-product-compilation.md index c5595469..e8bec972 100644 --- a/ohos/docs/08_FAQ/ohos-engine-product-compilation.md +++ b/ohos/docs/08_FAQ/ohos-engine-product-compilation.md @@ -2,12 +2,12 @@ For details about how to set up the Flutter engine environment, see https://gitee.com/openharmony-sig/flutter_engine/blob/master/README_EN.md. -## Recommended Environment Configuration Version of the HarmonyOS Flutter Engine +## Recommended Environment Configuration Version of the OpenHarmony Flutter Engine 1. Python 3.8-3.11 (Error is reported in version 3.12.) 2. java 17 3. DevEco-Studio / command-line-tools , 5.0.3.300+ - 1. ohpm, hvigorw, node, and HarmonyOS SDK are included. + 1. ohpm, hvigorw, node, and OpenHarmony SDK are included. 4. Xcode14.3 ## Generating flutter.har file diff --git a/ohos/docs/08_FAQ/ohos-run.md b/ohos/docs/08_FAQ/ohos-run.md index 0d852479..892d61e6 100644 --- a/ohos/docs/08_FAQ/ohos-run.md +++ b/ohos/docs/08_FAQ/ohos-run.md @@ -1,9 +1,9 @@ # ohos Program Running -## Runtime Error Occurring at /data/storage/el1/bundle/entry/ets/modules.abc After Compiling HarmonyOS +## Runtime Error Occurring at /data/storage/el1/bundle/entry/ets/modules.abc After Compiling OpenHarmony -Phenomenon: A runtime error occurs after compiling Flutter on HarmonyOS. +Phenomenon: A runtime error occurs after compiling Flutter on OpenHarmony. Error message: diff --git "a/ohos/docs/08_FAQ/ohos\345\274\225\346\223\216\344\272\247\347\211\251\347\274\226\350\257\221\347\233\270\345\205\263\351\227\256\351\242\230.md" "b/ohos/docs/08_FAQ/ohos\345\274\225\346\223\216\344\272\247\347\211\251\347\274\226\350\257\221\347\233\270\345\205\263\351\227\256\351\242\230.md" index 66bcf768..f97267d1 100644 --- "a/ohos/docs/08_FAQ/ohos\345\274\225\346\223\216\344\272\247\347\211\251\347\274\226\350\257\221\347\233\270\345\205\263\351\227\256\351\242\230.md" +++ "b/ohos/docs/08_FAQ/ohos\345\274\225\346\223\216\344\272\247\347\211\251\347\274\226\350\257\221\347\233\270\345\205\263\351\227\256\351\242\230.md" @@ -7,7 +7,7 @@ flutter_engine环境编译配置参考 https://gitee.com/openharmony-sig/flutter 1. python 3.8-3.11, 3.12版本会出现报错。 2. java 17 3. DevEco-Studio / command-line-tools , 5.0.3.300+ - 1. 包含了 ohpm, hvigorw, node, HarmonyOS SDK + 1. 包含了 ohpm, hvigorw, node, OpenHarmony SDK 4. Xcode14.3 ## 如何生成flutter.har diff --git "a/ohos/docs/08_FAQ/\347\216\257\345\242\203\347\233\270\345\205\263\351\227\256\351\242\230.md" "b/ohos/docs/08_FAQ/\347\216\257\345\242\203\347\233\270\345\205\263\351\227\256\351\242\230.md" index 7fcae016..754f3604 100644 --- "a/ohos/docs/08_FAQ/\347\216\257\345\242\203\347\233\270\345\205\263\351\227\256\351\242\230.md" +++ "b/ohos/docs/08_FAQ/\347\216\257\345\242\203\347\233\270\345\205\263\351\227\256\351\242\230.md" @@ -109,5 +109,5 @@ strict_ssl=false - ::1 - 127.0.0.1 -执行结果有Flutter和HarmonyOS(表明基础环境配置正确,这两个平台均被支持) +执行结果有Flutter和OpenHarmony(表明基础环境配置正确,这两个平台均被支持) ![](../media/08/error.png) diff --git "a/ohos/docs/08_FAQ/\350\247\243\346\236\220flutter\347\233\270\345\205\263\347\232\204cppcrash\345\240\206\346\240\210.md" "b/ohos/docs/08_FAQ/\350\247\243\346\236\220flutter\347\233\270\345\205\263\347\232\204cppcrash\345\240\206\346\240\210.md" index 6a56ff38..34fcfe50 100644 --- "a/ohos/docs/08_FAQ/\350\247\243\346\236\220flutter\347\233\270\345\205\263\347\232\204cppcrash\345\240\206\346\240\210.md" +++ "b/ohos/docs/08_FAQ/\350\247\243\346\236\220flutter\347\233\270\345\205\263\347\232\204cppcrash\345\240\206\346\240\210.md" @@ -8,7 +8,7 @@ llvm-addr2line 工具是一个可以将指令的地址和可执行映像转换 ## 2. 工具位置 -在 **DevEco Studio** 和 **Command Line Tools for HarmonyOS** 的sdk目录下有这个工具,对应路径如下 +在 **DevEco Studio** 和 **Command Line Tools for OpenHarmony** 的sdk目录下有这个工具,对应路径如下 - Windows: sdk/default/openharmony/native/llvm/bin/llvm-addr2line.exe - Linux/Mac: sdk/default/openharmony/native/llvm/bin/llvm-addr2line diff --git a/ohos/docs/09_specifications/README_EN.md b/ohos/docs/09_specifications/README_EN.md index 71eb11bc..e53baab4 100644 --- a/ohos/docs/09_specifications/README_EN.md +++ b/ohos/docs/09_specifications/README_EN.md @@ -1,5 +1,5 @@ # Specifications -1. [Directory Structure of the HarmonyOS Flutter Project](./directory-structure-of-the-harmonyos-flutter-project.md) +1. [Directory Structure of the OpenHarmony Flutter Project](./directory-structure-of-the-openharmony-flutter-project.md) 2. [Updating the Flutter Plugin Structure](./update-flutter-plugi-structure.md) diff --git a/ohos/docs/09_specifications/directory-structure-of-the-harmonyos-flutter-project.md b/ohos/docs/09_specifications/directory-structure-of-the-openharmony-flutter-project.md similarity index 91% rename from ohos/docs/09_specifications/directory-structure-of-the-harmonyos-flutter-project.md rename to ohos/docs/09_specifications/directory-structure-of-the-openharmony-flutter-project.md index edcddc25..23d0885a 100644 --- a/ohos/docs/09_specifications/directory-structure-of-the-harmonyos-flutter-project.md +++ b/ohos/docs/09_specifications/directory-structure-of-the-openharmony-flutter-project.md @@ -1,6 +1,6 @@ -# Directory Structure of the HarmonyOS Flutter Project +# Directory Structure of the OpenHarmony Flutter Project -## Key Files of the HarmonyOS Flutter Project +## Key Files of the OpenHarmony Flutter Project 1. Configuration files 1. **ohos/AppScope/app.json5**, a project configuration file, contains the global configuration information of the application, including the bundle name, vendor, and version number of the application. diff --git a/ohos/docs/09_specifications/update-flutter-plugin-structure.md b/ohos/docs/09_specifications/update-flutter-plugin-structure.md index 622600e6..d0640220 100644 --- a/ohos/docs/09_specifications/update-flutter-plugin-structure.md +++ b/ohos/docs/09_specifications/update-flutter-plugin-structure.md @@ -125,7 +125,7 @@ cd integration_test/example flutter run -d $DEVICE --debug ``` -### Paying Attention to the HAP File Reference in the Configuration File When Running the HarmonyOS Application +### Paying Attention to the HAP File Reference in the Configuration File When Running the OpenHarmony Application The referenced HAP file is in the **ohos/har** directory. diff --git a/ohos/docs/media/07_1/03_HarmonyOS_plugin_structure.png b/ohos/docs/media/07_1/03_OpenHarmony_plugin_structure.png similarity index 100% rename from ohos/docs/media/07_1/03_HarmonyOS_plugin_structure.png rename to ohos/docs/media/07_1/03_OpenHarmony_plugin_structure.png diff --git a/ohos/docs/media/07_1/05_The_ohos_project_in_the_HarmonyOS_plugin.png b/ohos/docs/media/07_1/05_The_ohos_project_in_the_OpenHarmony_plugin.png similarity index 100% rename from ohos/docs/media/07_1/05_The_ohos_project_in_the_HarmonyOS_plugin.png rename to ohos/docs/media/07_1/05_The_ohos_project_in_the_OpenHarmony_plugin.png -- Gitee From cc8b4ee806908b13ec1b0cf3c333a19244823e41 Mon Sep 17 00:00:00 2001 From: huangxiaoyao <976125628@qq.com> Date: Wed, 11 Dec 2024 20:31:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= =?UTF-8?q?=EF=BC=9AOpenHarmony=E8=AE=BE=E5=A4=87=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=8C=87=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangxiaoyao <976125628@qq.com> --- ...20\350\241\214\346\214\207\345\257\274.md" | 26 +++++++++++++++++++ ohos/docs/03_environment/README.md | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 "ohos/docs/03_environment/OpenHarmony\350\256\276\345\244\207\350\277\220\350\241\214\346\214\207\345\257\274.md" diff --git "a/ohos/docs/03_environment/OpenHarmony\350\256\276\345\244\207\350\277\220\350\241\214\346\214\207\345\257\274.md" "b/ohos/docs/03_environment/OpenHarmony\350\256\276\345\244\207\350\277\220\350\241\214\346\214\207\345\257\274.md" new file mode 100644 index 00000000..11bbb470 --- /dev/null +++ "b/ohos/docs/03_environment/OpenHarmony\350\256\276\345\244\207\350\277\220\350\241\214\346\214\207\345\257\274.md" @@ -0,0 +1,26 @@ +## OpenHarmony设备运行指导 + +* 挂载磁盘:```hdc target mount``` + +* 修改沙箱文件```/system/ets/sandbox/appdata-sanbox.json```,搜索```/system/lib```关键字,在相同位置加上```/system/lib64```配置 + ``` + { + "src-path": "/system/lib64", + "sandbox-path": "/system/lib64", + "sandbox-flags": [ + "bind", + "rec" + ], + "check-action-status": "false" + } + ``` + +* 创建工程:```flutter create --platforms ohos ``` + +* 编译运行 + + 1. 编译release包:```flutter build hap –no-tree-shake-icons``` + 2. 使用deveco工具打开ohos工程,找到文件```oh_modules\.ohpm\@ohos+flutter_ohos@xxx\oh_modules\@ohos\flutter_ohos\src\main\ets\view\FlutterView.ets``` 注释代码154行后,安装运行到设备中。 + ``` + // this.mainWindow?.on('windowStatusChange', this.windowStatusChangeCallback); + ``` \ No newline at end of file diff --git a/ohos/docs/03_environment/README.md b/ohos/docs/03_environment/README.md index 26308774..9ffd7304 100644 --- a/ohos/docs/03_environment/README.md +++ b/ohos/docs/03_environment/README.md @@ -1,4 +1,5 @@ # 环境搭建 ## 鸿蒙版Flutter集成与编译教程 -1. [鸿蒙版Flutter环境搭建指导](./鸿蒙版Flutter环境搭建指导.md) \ No newline at end of file +1. [鸿蒙版Flutter环境搭建指导](./鸿蒙版Flutter环境搭建指导.md) +2. [OpenHarmony设备运行指导](./OpenHarmony设备运行指导.md) \ No newline at end of file -- Gitee