i am using firebae auth, firebase core and googlesign iN in same flutter app. and above is the error i get when i use these 3 together. These plugins are working well seperately.
below is the error
D:\projects\image_text_translation\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:19: error: package io.flutter.plugins.firebase.auth does not exist
flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.auth.FlutterFirebaseAuthPlugin());
^
D:\projects\image_text_translation\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:24: error: package io.flutter.plugins.firebase.core does not exist
flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin());
^
D:\projects\image_text_translation\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:29: error: package io.flutter.plugins.googlesignin does not exist
flutterEngine.getPlugins().add(new io.flutter.plugins.googlesignin.GoogleSignInPlugin());
below is my pubspec.yaml file
name: image_text_translation
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependency_overrides:
firebase_messaging_platform_interface: 3.1.6
firebase_crashlytics_platform_interface: 3.1.13
cloud_firestore_platform_interface: 5.4.13
firebase_auth_platform_interface: 6.1.11
firebase_storage_platform_interface: 4.0.14
dependencies:
flutter:
sdk: flutter
google_ml_kit:
translator:
image_picker:
camera:
cupertino_icons: ^1.0.2
firebase_auth:
firebase_core:
google_sign_in:
flutter_signin_button: ^1.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons:
flutter_lints: ^1.0.0
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/logofinal.jpg"
flutter:
plugin:
platforms:
android:
package: com.google_ml_kit
pluginClass: GoogleMlKitPlugin
ios:
pluginClass: GoogleMlKitPlugin
Related
im trying to add a dependence in my pubspec.yaml but the
import 'package:firebase_database/firebase_database.dart' is taged with "Target of URI doesn't exist: 'package:firebase_database/firebase_database.dart'"
i cheked my pubspec.yaml and i've all dependences, but it still taged like error
dependencies:
cloud_firestore: ^3.1.5
cupertino_icons: ^1.0.2
firebase_database: ^2.0.2
firebase_auth: ^1.0.4
firebase_core: ^0.4.0
flutter:
sdk: flutter
fluttertoast: ^8.0.8
font_awesome_flutter: ^9.0.0
google_sign_in: ^5.0.3
provider: ^5.0.0
dev_dependencies:
flutter_test:
sdk: flutter
try flutter clean && flutter pub get.
Somtimes the package does not get included.
this is the package I can't import: firebase_auth: ^3.2.0
I tried importing different verions of it also flutter clean. I also tried flutter pub get, flutter pub upgrade, flutter pub outdated and none worked. I restarted the IDE several times and even created a new project but I stil get the same error in both VS Code and Android Studio.
Here is my pubspect.yaml
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
animated_text_kit: ^4.2.1
firebase_core: ^1.10.0
cloud_firestore: ^3.1.0
firebase_auth: ^3.2.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
flutter:
uses-material-design: true
assets:
- images/
I used both older versions of firebase_core & firebase_auth and my issue resolved.
firebase_core: ^1.0.0
firebase_auth: ^1.0.0
I am trying to add firebase-admin package to my pubspec.yaml in my flutter project, but due to the dependency conflict it is quite unresolvable for me to add the firebase-admin package. It is necessary for me to add the package for social login via firebase feature. Can anyone help me out with this problem?
Below is part of my pubspec.yaml
version: 1.0.0+1
environment:
sdk: ">=2.10.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_secure_storage: ^4.2.0
http: ^0.13.1
provider: ^5.0.0
cupertino_icons: ^1.0.2
hexcolor: ^2.0.3
modal_bottom_sheet: ^2.0.0
conditional_builder: ^1.0.2
flutter_form_builder: ^6.0.0-nullsafety.1
intl: ^0.17.0
flutter_svg: ^0.21.0+1
# FlutterFire Plugin
firebase_core: ^0.4.0+9
firebase_analytics: ^5.0.2
firebase_auth: ^0.14.0+5
cloud_firestore: ^0.12.9+5
# Profile Image Picker
image_picker: ^0.7.4
flutter_slidable: ^0.6.0
# Kakao Login
kakao_flutter_sdk: ^0.6.3
dio: ^4.0.0
json_annotation: ^4.0.1
shared_preferences: ^2.0.5
platform: ^3.0.0
package_info: ^2.0.0
dev_dependencies:
flutter_test:
sdk: flutter
Would you mind uploading the conflict messages?
This error happens while running the command 'flutter packages get'. I have added few dependencies for pubspec.yaml file to use firebase authentication:
name: flutter_auth
description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
flutter_svg: ^0.19.1
firebase_core: ^1.0.1
firebase_analytics: ^5.0.2
cloud_firestore: ^0.12.9+5
firebase_auth: ^1.0.1
google_sign_in: ^5.0.0
dev_dependencies:
flutter_test:
sdk: flutter
After execution of flutter pub get command I'm getting following error:
PS C:\Users\ajant\Downloads\myapp\myapp> flutter packages get
Because cloud_firestore >=0.11.0 <0.13.3 depends on firebase_core ^0.4.0 and flutter_auth depends on firebase_core ^1.0.1, cloud_firestore
>=0.11.0 <0.13.3 is forbidden.
So, because flutter_auth depends on cloud_firestore ^0.12.9+5, version solving failed.
Running "flutter pub get" in Welcome-Login-Signup-Page-Flutter-master...
pub get failed (1; So, because flutter_auth depends on cloud_firestore ^0.12.9+5, version solving failed.)
Try change the dependencies to their current versions:
cupertino_icons: ^1.0.2
flutter_svg: ^0.19.3
firebase_core: ^1.0.1
firebase_analytics: ^7.1.1
cloud_firestore: ^1.0.1
firebase_auth: ^1.0.1
google_sign_in: ^5.0.0
You can find the current version by google searching the dependencies one by one and find the current version in the installing tab. Here is one example:
https://pub.dev/packages/cloud_firestore/install
when adding cloud_firestore to the dependencies of the project and press packages get or upgrade this error pop up
Running "flutter packages get" in alaganbyasta...
Error on line 7, column 5 of pubspec.yaml: Expected a key while parsing a >block mapping.
cloud_firestore: ^0.7.4
^
pub get failed (65)
Process finished with exit code 65
I tried to upgrade flutter itself but I modified date_picker.dart before so he asks me for commit before upgrading
my pubspec.yaml is
name: alaganbyasta
description: A new Flutter application.
dependencies:
flutter:
sdk: flutter
cloud_firestore: v0.7.4
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
Change
dependencies:
flutter:
sdk: flutter
cloud_firestore: v0.7.4
cupertino_icons: ^0.1.2
to
dependencies:
flutter:
sdk: flutter
cloud_firestore: v0.7.4
cupertino_icons: ^0.1.2