diff --git a/packages/path_provider/path_provider_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets b/packages/path_provider/path_provider_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets index e4b95b43797af4425182bcd15654061d26c8baf6..a00049282e93c69f1b3dcd987538024f47e40ace 100644 --- a/packages/path_provider/path_provider_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets +++ b/packages/path_provider/path_provider_ohos/example/ohos/entry/src/main/ets/entryability/EntryAbility.ets @@ -14,17 +14,12 @@ */ import { FlutterAbility } from '@ohos/flutter_ohos' -import { FlutterPlugin } from '@ohos/flutter_ohos/src/main/ets/embedding/engine/plugins/FlutterPlugin'; import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant'; -import List from '@ohos.util.List'; import FlutterEngine from '@ohos/flutter_ohos/src/main/ets/embedding/engine/FlutterEngine'; export default class EntryAbility extends FlutterAbility { configureFlutterEngine(flutterEngine: FlutterEngine) { super.configureFlutterEngine(flutterEngine) - let plugins = GeneratedPluginRegistrant.getPlugins() as List; - plugins.forEach((plugin) => { - this.addPlugin(plugin); - }) + GeneratedPluginRegistrant.registerWith(flutterEngine) } } diff --git a/packages/path_provider/path_provider_ohos/ohos/build-profile.json5 b/packages/path_provider/path_provider_ohos/ohos/build-profile.json5 index a1151c7be0f08c3e4768d66e8568d3d53f7fbbaa..6858a89f9dfef9257c97f824d18dd39886ce2560 100644 --- a/packages/path_provider/path_provider_ohos/ohos/build-profile.json5 +++ b/packages/path_provider/path_provider_ohos/ohos/build-profile.json5 @@ -19,8 +19,8 @@ { "name": "default", "signingConfig": "default", - "compileSdkVersion": "4.0.0(10)", - "compatibleSdkVersion": "4.0.0(10)", + "compileSdkVersion": "4.1.0(11)", + "compatibleSdkVersion": "4.1.0(11)", "runtimeOS": "HarmonyOS", } ],