-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
鸿蒙add-to-app示例 #1993
Comments
能详细介绍下吗?我直接运行一致都没有成功,看不到flutter_boost.hap |
parse ohos project build data exception! Exception: can not found |
必须使用 flutter_flutter 才能运行吗?是否使用官方flutter就无法兼容OHOS? |
编译运行鸿蒙版Flutter Boost Example准备环境Flutter SDK必须使用OpenHarmony-Flutter(master或dev分支,基于官方3.7.12版本),官方的Flutter SDK,并不支持鸿蒙系统。使用Git将
注意 鸿蒙开发工具请从鸿蒙开发工具上下载 环境变量配置
export PUB_HOSTED_URL=https://pub.flutter-io.cn;
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export HOS_SDK_HOME=${ohos-cmd-tools-dir}/sdk
export PATH=$PATH:${ohos-cmd-tools-dir}/bin
export PATH=$PATH:${ohos-cmd-tools-dir}/tool/node/bin
export PATH=$PATH:${ohos-cmd-tools-dir}/sdk/HarmonyOS-NEXT-DB1/openharmony/toolchains
环境验证上述配置完成后,可以cd到 ./flutter doctor
[WARN] Not checking for version mismatch as custom version is being used.
[WARN] Version custom_3.7.12_ohos is not a valid semver
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel dev, 3.7.12-ohos, on macOS 13.6.5 22G621 darwin-arm64, locale zh-Hans-CN)
! Upstream repository https://gitee.com/openharmony-sig/flutter_flutter.git is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to https://gitee.com/openharmony-sig/flutter_flutter.git to dismiss this error.
[✓] HarmonyOS toolchain - develop for HarmonyOS devices
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[!] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
! CocoaPods 1.10.1 out of date (1.11.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[!] Android Studio (version 2023.3)
✗ Unable to find bundled Java version.
[✓] VS Code (version 1.91.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
! Doctor found issues in 4 categories.HarmonyOS toolchain` 检查 编译FlutterBoost如果使用了fvm,需先使用
运行FlutterBoost想要运行编译出来的hap,还需要进行签名。这里就直接推荐使用 如果不想通过 调试FlutterBoost想要在鸿蒙设备上调试Flutter程序,使用 |
一个简单的鸿蒙add-to-app示例:
https://github.com/0xZOne/ohos-flutter-add2app
The text was updated successfully, but these errors were encountered: