HarmonyOS flutter中path_provider等依赖原生功能的模块如何正确引入?

目前报错:

PlatformException(channel-error, Unable to establish connection on channel., null, null) 

现在的方案是更改 .ohos/entry/src/main/ets/entryability/EntryAbility.ets为:

import { GeneratedPluginRegistrant } from '@ohos/flutter_module'

import { FlutterAbility, FlutterEngine } from '@ohos/flutter_ohos'

export default class EntryAbility extends FlutterAbility {
  configureFlutterEngine(flutterEngine: FlutterEngine) {
    super.configureFlutterEngine(flutterEngine);
    GeneratedPluginRegistrant.registerWith(flutterEngine);
  }
}

不知是否合理?是否还有更合理的方案?

HarmonyOS
2天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
superinsect
相关问题
HarmonyOS A、B模块引入C模块
83浏览 • 1回复 待解决
HarmonyOS 引入nfc模块controller爆红
117浏览 • 1回复 待解决
HarmonyOS 模块依赖问题
125浏览 • 1回复 待解决
HarmonyOS原生如何flutter传值
593浏览 • 1回复 待解决
模块依赖冲突/依赖仲裁方法?
1559浏览 • 1回复 待解决
HarmonyOS flutter接入HarmonyOS原生视图
225浏览 • 1回复 待解决
HarmonyOS feature模块循环依赖
108浏览 • 1回复 待解决