HarmonyOS Flutter中Platform.isOhos找不到

Flutter中Platform.isOhos找不到,.flutter_flutter\bin\cache\pkg\sky_engine\lib\io\platform.dart中确实没有isOhos的定义。

三方库版本:

[!] Flutter (Channel dev, 3.7.12-ohos, on Microsoft Windows [版本 10.0.22631.3737], locale zh-CN)
      Flutter version 3.7.12-ohos on channel dev at D:\flutter_flutter
    ! 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.
      Framework revision 5d5b44473f (3 days ago), 2024-06-24 10:41:06 +0000
      Engine revision 1a65d409c7
      Dart version 2.19.6
      DevTools version 2.20.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 D:\DevEco Studio\sdk, available api versions has [12:HarmonyOS-NEXT-DB1]
      Ohpm version 5.0.2
      Node version v18.14.1
      Hvigorw binary at D:\DevEco Studio\tools\hvigor\bin\hvigorw
HarmonyOS
8天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
put_get

可以引用该库来解决这个问题:https://pub.dev/packages/flutter_platform_utils , 如果有Platform.isOhos 的判断,建议换成 PlatformUtils.isOhos

分享
微博
QQ
微信
回复
8天前
相关问题
HarmonyOS DevTools调试网页找不到设备
627浏览 • 1回复 待解决
HarmonyOS 找不到GestureRecognizer类
158浏览 • 1回复 待解决
HarmonyOS 找不到对应组件
356浏览 • 1回复 待解决
HarmonyOS 引用找不到方法
335浏览 • 1回复 待解决
HarmonyOS version-name找不到
511浏览 • 1回复 待解决
HarmonyOS 找不到崩溃日志问题
335浏览 • 1回复 待解决
Harmony找不到HCI日志
2706浏览 • 1回复 待解决
HarmonyOS IDE hvigor缓存找不到
194浏览 • 1回复 待解决
HarmonyOS 企业管理菜单找不到
121浏览 • 1回复 待解决
找不到图片和布局资源
12224浏览 • 8回复 待解决
HarmonyOS 录像后,图库里找不到视频
153浏览 • 1回复 待解决
HarmonyOS app Crash但是找不到错误原因
163浏览 • 1回复 待解决
HarmonyOS 依赖自己编译的so,找不到
152浏览 • 1回复 待解决
HarmonyOS AppGallery上证书申请找不到
148浏览 • 1回复 待解决
导入ohos相关模块都找不到
6411浏览 • 1回复 待解决