报错:
1 ERROR: ArkTS:ERROR File:
/Users/xxxxx/.pub-cache/git/ohos_flutter_packages-b615f80433c1724d467e3a63f7861855e8144a99/packages/webview_flutter/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_f
lutter/OhosWebView.ets:17:10
Module '"@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformView"' has no exported member 'Params'. Did you mean to use 'import Params from
"@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformView"' instead?
2 ERROR: ArkTS:ERROR File:
/Users/xxxxx/.pub-cache/git/ohos_flutter_packages-b615f80433c1724d467e3a63f7861855e8144a99/packages/webview_flutter/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_f
lutter/WebViewHostApiImpl.ets:16:24
Module '"@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformView"' has no exported member 'Params'. Did you mean to use 'import Params from
"@ohos/flutter_ohos/src/main/ets/plugin/platform/PlatformView"' instead?
3 ERROR: ArkTS:ERROR File:
/Users/xxxxx/.pub-cache/git/ohos_flutter_packages-b615f80433c1724d467e3a63f7861855e8144a99/packages/webview_flutter/webview_flutter_ohos/ohos/src/main/ets/io.flutter.plugins/webview_f
lutter/WebViewHostApiImpl.ets:431:3
Property 'getView' in type 'WebViewPlatformView' is not assignable to the same property in base type 'PlatformView'.
Type '() => WrappedBuilder<[Params]>' is not assignable to type '() => DVModel'.
Type 'WrappedBuilder<[Params]>' is missing the following properties from type 'DVModel': id_, compType, params, events, and 2 more.
可以尝试如下步骤:
1.需要把flutter升级到dev的最新版本,IDE、SDK等都需要升级到最新,使用API12。
2.清除项目缓存,先找到编译产物的地址,删掉.har。
3.环境变量 FLUTTER\_STORAGE\_BASE\_URL=https://storage.flutter-io.cn。
4.删除<flutter\>/bin/cache 目录,并在项目中执行flutter clean后再运行。