首页 > 解决方案 > 插件 `XXXXX` 使用了已弃用的 Android 嵌入版本

问题描述

我试图使用 pub get 来获得我的依赖,但我不断收到一堆错误。我被困在这些错误中。

我试过 flutter clean, flutter upgrade and flutter doctor没有任何问题。然后我试着 flutter pub cache repair女巫给了我这个错误Failed to reactivate 1 package: - intl_utils pub finished with exit code 69

完全错误

The plugins `facebook_audience_network, flutter_statusbarcolor_ns, flutter_webview_plugin, 
notification_permissions, onesignal_flutter, sms_autofill` use a deprecated version of the 
Android embedding. To avoid unexpected runtime failures or future build failures, try to 
see if these plugins support the Android V2 embedding. Otherwise, consider removing them 
since a future release of Flutter will remove these deprecated APIs. If you are plugin 
author, take a look at the docs for migrating the plugin to the V2 embedding: 
https://flutter.dev/go/android-plugin-migration.

我的PUBSPEC.YAML

environment:
  sdk: '>=2.12.0 <3.0.0'

facebook_audience_network: 1.0.0-nullsafety.0

flutter_statusbarcolor_ns: 0.3.0-nullsafety
flutter_webview_plugin: 0.4.0
notification_permissions: 0.5.0
onesignal_flutter: 3.2.0
sms_autofill: 2.0.1
...

标签: flutterflutter-dependenciesdeprecated

解决方案


这是为了新的颤振更新。你无能为力。使用其他包或要求包开发人员解决问题。这个错误出现在flutter 2.5版本之后。


推荐阅读