Some input files use or override a deprecated API Flutter build android

12,648

This is a known issue with the shared_preferences plugin with flutter. This issue has been addressed about 20 days ago. Make sure that you are using the newest version of shared_preferences (0.5.6+3) and update to reflect this in your pubspec.yaml.

Share:
12,648
Britanik
Author by

Britanik

Updated on June 09, 2022

Comments

  • Britanik
    Britanik almost 2 years

    I have a flutter project and I want to build it in android studio. I build it with this command in the terminal:

    flutter build apk --release

    I'm getting this error report:

    Note: C:\Users\Jovik\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\path_provider-1.5.1\android\src\main\java\io\flutter\plugins\pathprovider\PathProviderPlugin.java uses or overrides
     a deprecated API.
    Note: Recompile with -Xlint: deprecation for details.
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint: deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint: unchecked for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint: unchecked for details.
    C:\Users\Jovik\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\shared_preferences-0.5.6\android\src\main\java\io\flutter\plugins\sharedpreferences\SharedPreferencesPlugin.java:25: warn
    ing: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated
        setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
    

    I'm not a flutter developer so I have no special knowledge of these technologies. I have upgraded flutter and the flutter doctor did not find any error what problem? Could you help me too? Give advice on what I’m doing wrong.

  • Britanik
    Britanik about 4 years
    Yeah you are right.In my case it was 0.5.6.I updated it to 0.5.6+3 and typed in terminal flutter pub get then rebuilded it but i'm still getting this error.What do you advice?
  • Vishvak Seenichamy
    Vishvak Seenichamy about 4 years
    Try running flutter clean and then also running flutter upgrade.