how to fixed this issue while integrate with firebase - flutter

C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.2.1\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-2.2.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-2.2.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-1.3.0\android\src\main\java\io\flutter\plugins\firebase\auth\FlutterFirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_storage-8.1.1\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

Two things helped me..
setting minSdkVersion=21 in app/build.gradle
running flutter doctor --android-licenses in terminal
I hope it'll work for you.

this is the library version problem.
firebase libraries are conflicting with each other.
cloud_firestore: any
By doing this, you will solve the problem, but this is not the solution.

Related

What does "Note: Recompile with -Xlint:unchecked for details." mean? [duplicate]

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
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.
Keep you app and app dependencies up to date and don't worry much about the warnings.

Deprecated Apis when compiling

Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.6.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:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.5.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:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.5.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:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-3.1.0\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:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_storage-10.0.3\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: 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: C:\flutter\.pub-cache\hosted\pub.dartlang.org\geocoding-2.0.1\android\src\main\java\com\baseflow\geocoding\GeocodingPlugin.java uses
or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker-0.8.4\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I faced this warning notes when compiling, it doesn't give a problem but i want to delete that.
I tried to update the packages to the last versions, but still gives the warnings.
I think i should delete a pub cache file or something like that.
Help please!

?The application is working but there is an error in firebase_auth and firebase_core_web

Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_auth_web-0.1.3+1\android\src\main\java\io\flutter\plugins\firebaseauth_web\FirebaseAuthWebPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core_web-0.1.1+2\android\src\main\java\io\flutter\plugins\firebase_core_web\FirebaseCoreWebPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
This is not really a problem for you, just keep writing your code.
Kudos.

Not able to run flutter run. Getting some androidx error

My flutter run command is not working now. It was working 4hrs before. Suddenly something happended. I didn't changed anything. Just added few plugins and removed. Because it was not supporting for my SDK version. Already wasted so much time. Please help me on this issue.
Note: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.6/android/src/main/java/io/flutter/plugins/connectivity/ConnectivityBroadcastReceiver.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 or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.0+2/android/src/main/java/com/flutter_webview_plugin/WebviewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class io.flutter.embedding.engine.plugins.FlutterPlugin.FlutterPluginBinding, unresolved supertypes: androidx.lifecycle.LifecycleOwner
e: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/in_app_update-1.1.11/android/src/main/kotlin/de/ffuf/in_app_update/InAppUpdatePlugin.kt: (8, 28): Unresolved reference: NonNull
e: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/in_app_update-1.1.11/android/src/main/kotlin/de/ffuf/in_app_update/InAppUpdatePlugin.kt: (55, 38): Unresolved reference: NonNull
e: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/in_app_update-1.1.11/android/src/main/kotlin/de/ffuf/in_app_update/InAppUpdatePlugin.kt: (57, 34): Unresolved reference: binaryMessenger
e: /Users/sunisha/Developement/flutter/.pub-cache/hosted/pub.dartlang.org/in_app_update-1.1.11/android/src/main/kotlin/de/ffuf/in_app_update/InAppUpdatePlugin.kt: (63, 40): Unresolved reference: NonNull
When I run Flutter channel;
You are using an old flutter version, change to the stable channel, by executing:
flutter channel stable
and then upgrade flutter by executing:
flutter upgrade
Then you can update your packages by doing:
flutter pub upgrade
https://flutter.dev/docs/development/tools/sdk/upgrading
https://flutter.dev/docs/development/tools/sdk/releases

What causes "Note: Recompile with -Xlint:deprecation for details." error in Flutter?

Nowadays I am seeing this error while flutter run or flutter build commands. Anyone knows what causes it? Is it something serious?
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\path_provider-1.6.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: C:\flutter\.pub-cache\hosted\pub.dartlang.org\permission_handler-4.2.0+hotfix.3\android\src\main\java\com\baseflow\permissionhandler\PermissionHandlerPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\share-0.6.3+6\android\src\main\java\io\flutter\plugins\share\SharePlugin.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:\flutter\.pub-cache\hosted\pub.dartlang.org\video_player-0.10.8+1\android\src\main\java\io\flutter\plugins\videoplayer\VideoPlayerPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
the pacackage the you are using, its overriding a method which is marked as deprecated, this is what is causing that warning, its not something scary, but you should be aware of