I added some dependencies on my flutter app but there was an error when building the app. The app was run. Please, anyone can tell me the correct reason?
Dependencies,
dependencies:
flutter:
sdk: flutter
firebase_core: ^0.7.0
firebase_auth: ^0.20.0
firebase_database: ^6.0.0
#cloud_firestore: ^0.16.0
firebase_storage: ^7.0.0
flutter_staggered_grid_view: ^0.4.0
fluttertoast: ^8.0.6
google_maps_place_picker: ^1.0.1
image_picker: ^0.6.7+22
multi_image_picker: ^4.7.14
transparent_image: ^2.0.0
Warning,
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Note: C:\Flutter\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:\Flutter\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:\Flutter\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
1 Answer 1
if you have application.java replace with the following:
@Override
public void registerWith(PluginRegistry registry) {
FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));
}
answered May 10, 2021 at 16:52
Biruk Telelew
1,1938 silver badges13 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
Explore related questions
See similar questions with these tags.
lang-dart