1、下载鸿蒙开发工具
deveco-studio-5.0.3.600
下载地址:https://developer.huawei.com/consumer/cn/download/
2、安装Java17
oracle官方Java17
https://www.oracle.com/java/technologies/downloads/#java17
3、下载Flutter(目前Harmony只支持Flutter3.7.12版本)
git clone https://gitee.com/openharmony-sig/flutter_flutter.git
4、配置环境
export PATH=/Users/admin/flutter_flutter/bin:$PATH
# 国内镜像
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
# 拉取下来的flutter_flutter/bin目录
export PATH=/Users/admin/flutter_flutter/bin:$PATH
# HamonyOS 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
5、检查
flutter doctor -v
本站资源均来自互联网,仅供研究学习,禁止违法使用和商用,产生法律纠纷本站概不负责!如果侵犯了您的权益请与我们联系!
转载请注明出处: 免费源码网-免费的源码资源网站 » 【HarmonyOS】鸿蒙集成Flutter
发表评论 取消回复