alibaba / alibaba/flutter_boost
鸿蒙版alpha版来了,欢迎大家反馈bug
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
期待已久的flutter_boost鸿蒙适配初步完毕了。目前基于4.4.2版本,核心功能已经开发完毕,但因为源于鸿蒙版本的flutter引擎还在迭代中,部分接口可能会有细调整,但大致不会有大改。
本分支会等待稳定后会择期合会到master分支
如遇问题,欢迎反馈另开issue反馈,issue仅用于安装说明指引🤪
# 太长不看版
熟悉fluttrboost的老司机,直接切换至 [main ](https://github.com/alibaba/flutter_boost/tree/main) 分支即可
pubspec.yaml
```
flutter_boost:
git:
url: "git@github.com:alibaba/flutter_boost.git"
ref: "main"
```
# 详细鸿蒙版安装flutterboost教程 (addToApp)
详看:[https://github.com/alibaba/flutter_boost/blob/main/docs/install.md](https://github.com/alibaba/flutter_boost/blob/main/docs/install.md)
# 运行example 看看
如果一切还很懵逼,先运行一下example看看。代码也直接参考example的代码
### 1.切换flutter版本
[https://gitee.com/openharmony-sig/flutter_flutter](https://gitee.com/openharmony-sig/flutter_flutter/) dev或者master 分支都行
### 2.配置好flutter_boost/ohos/local.properties 和 flutter_boost/example/ohos/local.properties
比如我的是这样的,按葫芦画瓢即可
```java
hwsdk.dir=/Users/xiaoxiang/Library/Huawei/Sdk
sdk.dir=/Users/xiaoxiang/Library/Huawei/Sdk/openharmony
nodejs.dir=/Users/xiaoxiang/node/node-16.20.1
```
### 3.sdk10 请切换到 task/4.4.2-support-ohos-api10 分支(后续不维护api10了,建议升级到api11)
### 4.打开AndrioidStudio + 真机运行
打开AndrioidStudio,插上真机直接运行即可
PS:现在直接打包到flutter_flutter的libflutter.so和har包可能会比较旧,**建议**自己编译flutter_engine,然后通过local engine的方式运行
附上我的local engine的参数:
`--local-engine-src-path /Users/xiaoxiang/Documents/code/ali_flutter_engine/ohos_flutter_engine/src --local-engine ohos_debug_unopt_arm64`

# 错误排查:
1. Exception: profile_tmp_template.json is not found,Please refer to the readme to create the file.
解决办法:
签名问题,使用DevEcoStuido 打开flutter_boost/example/ohos,然后直接运行后,按照提示签名即可。再重新会到AndrdoiStudio重新运行
# 反馈问题
创建issue,添加 OHOS label即可
# 正在进行中的工作
- 透明flutterPage
- 文档丰富
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.