Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

flutter

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.**

**

like image 808
Qadir Kərimov Avatar asked Aug 12 '21 11:08

Qadir Kərimov


People also ask

Does libphonenumber support the Android V2 embedding?

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.

Why libphonenumber plugin is not working?

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.

Which flutter plugins support the Android V2 embedding?

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.

How to avoid runtime failure when using Android V2 in flutter?

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.


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

like image 118
Ercross Avatar answered Nov 15 '22 03:11

Ercross


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

like image 37
Saad Ahmed Avatar answered Nov 15 '22 05:11

Saad Ahmed


Seems like this package hasen't been upgraded yet. A workaround is listed on the plugins issue page: https://github.com/natintosh/intl_phone_number_input/issues/279

like image 25
Rasmus Christensen Avatar answered Nov 15 '22 03:11

Rasmus Christensen