Search code examples
androidfirebaseflutterflutter-build

Note: Recompile with -Xlint:deprecation. Note: Some input files use or override a deprecated API


When I run flutter run or debug my code after flutter clean it shows this error

Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core-0.7.0\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.16.0+1\android\src\main\java\io\flutter\plugins\firebase\firestore\FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.16.0+1\android\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\TransactionStreamHandler.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.20.1\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.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. C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_storage-7.0.0\android\src\main\java\io\flutter\plugins\firebase\storage\FlutterFirebaseStoragePlugin.java:38: warning: [deprecation] Registrar in PluginRegistry has been deprecated public static void registerWith(PluginRegistry.Registrar registrar) { ^ 1 warning Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\google_api_availability-2.0.4\android\src\main\java\com\baseflow\googleapiavailability\GoogleApiAvailabilityPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.5\android\src\main\java\com\baseflow\location_permissions\LocationPermissionsPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\google_sign_in-4.5.9\android\src\main\java\io\flutter\plugins\googlesignin\GoogleSignInPlugin.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: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider-0.5.0+1\android\src\main\java\io\flutter\plugins\pathprovider\PathProviderPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

but it only shows one time after that it doesn't show any error till I delete build flutter clean. Is there any way to remove this error ? OR does it cause any issue because I didn't see any issue yet in my app. Thanks


Solution

  • Don't worry to much about it. The error is about Firebase library which has, in the native implementation, some code that makes reference to APIs already marked as deprecated.

    This is not going to generate any issues in your code and they will fix this in the next version of the library for sure.

    This happens only after the flutter clean because that is the moment when this is compiled and this warning is detected. After that, compilation is cached and is not compiled anymore.