プラグイン`fluttertoast`は、非推奨バージョンのAndroid埋め込みを使用します。

-プラグインfluttertoastは、非推奨バージョンのAndroid埋め込みを使用します。

問題の説明

`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に組み込まれている非推奨バージョンを使用します。
予期しないランタイムエラーや将来のビルドエラーを回避するには、このプラグインがAndroidV2の埋め込みをサポートしているかどうかを確認してください。
それ以外の場合は、Flutterの将来のバージョンでこれらの非推奨のAPIが削除されるため、削除することを検討してください。

解決:

ターミナル
を開き、プラグインをアップグレードするためのコードを入力します

flutter pub upgrade --major-versions

ここに画像の説明を挿入

次のようにプラグインを最新バージョン
にアップグレードし、fluttertoastの3.1.3バージョンを8.0.9にアップグレードします。

ここに画像の説明を挿入
パブは成功する
ここに画像の説明を挿入

おすすめ

転載: blog.csdn.net/qq_43336158/article/details/123928238