The plugin `libphonenumber` uses a deprecated version of the Android embedding flutter

Viewed 3872

This error occurs when flutter pub get or flutter run

**

The plugin libphonenumber 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.**

**

3 Answers

This issue is usually encountered when your project uses Flutter 2.5 and above. Literally, it means one or more packages used in your project, libphonenumber in your case, hasn't been upgraded to use Android v2 embedding. The error won't stop your code from running. If you're the package creator, you can follow this link to read more on Flutter plugin migration

if you are using this package intl_phone_number_input then update to latest version. hopefully it will fix this issue.

Related