35

i was trying to get my dependences using pub get, but i keep getting a bunch off errors. And i'm stuck in these error.

I have tried flutter clean, flutter upgrade and flutter doctor without any issue. Then i tried flutter pub cache repair witch gave me this error Failed to reactivate 1 package: - intl_utils pub finished with exit code 69

Full error

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.

MY 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
...
Tharindu Lakshan
  • 3,995
  • 6
  • 24
  • 44
Soto-kun
  • 371
  • 1
  • 3
  • 7
  • Could you share your pubspec.yaml? – Er1 Aug 25 '21 at 09:56
  • "since a future release of Flutter will remove these deprecated APIs" So I think you are good with the current Flutter version to use, just make sure before you get the flutter next update that every one of these packages already got updated with the problem fix or you replaced it with another one. – Muhammed Refaat Apr 10 '22 at 00:50

9 Answers9

18

This is for the new flutter update. There is nothing you can do. Either use an other package or ask the package developer to fix the problem. This error is after version 2.5 of the flutter.

moein
  • 188
  • 7
6

This is after flutter v2.5 packge Error. Now Downgrade the flutter version Version_list. Now we look How to downgrade Flutter version. Following these Simple Steps.

Go to Terminal and Check flutter --version

then after Change the channel like this flutter channel stable/dev/beta/master

After Type flutter downgrade <version> (example: flutter downgrade v1.2.1)(You Can check verified versions this place)

Now Check flutter --version .

Now see Downgrade the version

Thank You

4

That is because of the new flutter updates, but it won't stop you from building or running your code. or you could just switch to another package that can achieve the same task. Until the packages author update to v2 Android embedding

Toby William
  • 101
  • 1
  • 5
3

You can fix the problem by following these instructions:

1- Close the pubspec.yaml file
2- Go to teminal
3- And run the following command

  • flutter pub upgrade --magor-version or flutter pub upgrade package_name
Saad
  • 539
  • 2
  • 19
2

Use the following command to run the project:-

flutter run --no-sound-null-safety
The Coding Fox
  • 1,488
  • 1
  • 4
  • 18
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 10 '22 at 06:26
0

This error from packages, the package developer should update something to the V2 Android embedding.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 15 '21 at 17:05
0

I have encountered the same problem before. At that time I want to add this package agora_rtm: ^0.9.14, but then I got the same error as you stated above. What I did was just change the version number which is the latest one agora_rtm: ^1.1.0 then pub get and voila it works!

Yuri Haruno
  • 111
  • 1
  • 7
-1

Update the packages

  • facebook_audience_network
  • flutter_statusbarcolor_ns
  • flutter_webview_plugin
  • notification_permissions
  • onesignal_flutter
  • sms_autofill

to latest to solve the issue.

Martin Braun
  • 10,906
  • 9
  • 64
  • 105
Seachal
  • 27
  • 3
-3

may be u can change the version of the 'xxx' in pubspec.yaml for exemple i have encountered a problem with 'Tflite'

tflite: ^1.1.2 then i changed it to tflite: ^1.0.2

Omar rai
  • 29
  • 5
  • 2
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 13 '21 at 06:20