-The plugin fluttertoast
uses a deprecated version of the Android embedding.
问题描述
`The plugin `fluttertoast` uses a deprecated version of the Android embedding.`To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding.
Otherwise, consider removing it 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.
fluttertoast: ^3.1.3
原因分析:
fluttertoast插件使用的是Android内置的一个弃用版本。
为了避免意外的运行失败,或者将来的构建失败,试着看看这个插件是否支持Android V2嵌入。
否则,考虑删除它,因为Flutter的未来版本将删除这些已弃用的api。
解决方案:
打开Terminal
输入一下代码,升级插件
flutter pub upgrade --major-versions
将插件升级到最新版本
如下,将fluttertoast的3.1.3版本升级到8.0.9
Pub get 成功