本版本为基于 Flutter 3.22.0 适配的 OpenHarmony 版本。本版本支持和完善 OpenHarmony 平台侧能力,提升稳定性。
OpenHarmony API16
2025 年 4 月 28 日
组件 | 版本号 |
---|---|
ROM | 205.0.0.150 |
IDE | DevEco Studio 5.0.11.100 |
Flutter SDK | 3.22.0-ohos-1.0.0 |
git clone https://gitcode.com/openharmony-sig/flutter_flutter
git checkout -b 3.22.0-ohos origin/3.22.0-ohos
最后大家也可以看一下我本地的环境配置
以下是作者本地的 Flutter 环境配置信息:
git pull origin 3.22.0-ohos
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 6 (delta 4), reused 5 (delta 4), pack-reused 0 (from0)
Unpacking objects: 100% (6/6), 1.83 KiB | 624.00 KiB/s, done.
From gitcode.com:openharmony-sig/flutter_flutter
* branch 3.22.0-ohos -> FETCH_HEAD
87bd7c9c6d..05ecc17acd 3.22.0-ohos -> origin/3.22.0-ohos
Updating 87bd7c9c6d..05ecc17acd
Fast-forward
release-notes/Flutter 3.22.0-ohos 0.1.2 ReleaseNote.en.md | 2 +-
release-notes/Flutter 3.22.0-ohos 0.1.2 ReleaseNote.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
jianguo@nutpi flutter % flutter doctor -v
Building flutter tool...
Resolving dependencies...
Downloading packages...
Got dependencies.
[!] Flutter (Channel [user-branch], 3.22.1-ohos-0.1.1, on macOS 13.4.122F82 darwin-arm64, locale zh-Hans-CN)
! Flutter version 3.22.1-ohos-0.1.1 on channel [user-branch] at /Users/jianguo/huawei/flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
! Upstream repository git@gitcode.com:openharmony-sig/flutter_flutter.git is not the same as FLUTTER_GIT_URL
• FLUTTER_GIT_URL = https://gitcode.com/openharmony-sig/flutter_flutter.git
• Framework revision 05ecc17acd (22 hours ago), 2025-05-05 15:05:20 +0800
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
[✓] HarmonyOS toolchain - develop for HarmonyOS devices
• OpenHarmony Sdk at /Users/jianguo/Library/OpenHarmony/Sdk, available api versions has [15:15, 12:12]
• Ohpm version 5.0.13
• Node version v18.20.1
• Hvigorw binary at /Applications/DevEco-Studio.app/Contents/tools/hvigor/bin/hvigorw
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/jianguo/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/jianguo/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 14.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E300c
! Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
[✓] VS Code (version 1.99.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.108.0
[✓] Connected device (3 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.4.1 22F82 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 13.4.1 22F82 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 136.0.7103.48
[!] Network resources
✗ A network error occurred while checking "https://github.com/": Operation timed out
! Doctor found issues in 3 categories.
jianguo@nutpi flutter %
参考资料
[1]
坚果派官网: https://www.nutpi.net/
[2]
鸿蒙版 Flutter 电子书: https://atomgit.com/nutpi/gitbook-harmonyos-flutter
[3]
鸿蒙版 Flutter 电子书: https://gitcode.com/nutpi/gitbook-harmonyos-flutter
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有