Registrar in PluginRegistry has been deprecated

5,390

Solution 1

  1. For deprecation pop will occur every time you do a flutter clean and then build the project again. I'd suggest you use the latest versions of firebase and google sign.

If this helps i was using google_sign_in: ^5.0.2 and other firebase dependencies were set to null

  1. For the grey screen as you said the app was able to run when you removed the image from your code. My assumption is it was not able to load the image from the folder structure or it was able to load the image but it had some renderoverflow issues.

Solution 2

I would suggest don't specify the version for firebase_core and google_sign_in in pubspec.yaml file.

Just added them in your file like firebase_core: google_sign_in:

run flutter clean and build the project again

Share:
5,390
Pranjal Chaplot
Author by

Pranjal Chaplot

Updated on December 30, 2022

Comments

  • Pranjal Chaplot
    Pranjal Chaplot over 1 year

    My Flutter is Working fine in debug mode when connected to a real device. But when building the apk it shows the following error. I tried running flutter pub get and flutter pub upgrade numerous time but to no effect.

    Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.2.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\google_sign_in-5.0.4\android\src\main\java\io\flutter\plugins\googlesignin\GoogleSignInPlugin.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.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\firebase_auth-1.2.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: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.2.0\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.0\android\src\main\java\io\flutter\plugins\firebase\firestore\streamhandler\TransactionStreamHandler.java uses unchecked or unsafe operations.  
    Note: Recompile with -Xlint:unchecked for details.
    

    I am creating this app which works perfectly debug mode when I connect my Phone as an emulator but when I build the APK it shows the above error even then after completion when I install the app on my phone there are some things that don't work. the main issue: Orignal Question