Ad
Flutter 'Packages Get' Failed After Adding Firebase Dependency
I am trying to add Firebase to my flutter app. But when I add firebase_core dependency in the pubspec_yaml and run Packages get, it gives an error.
19-----dependencies:
20-----flutter:
21-----sdk: flutter
22-----firebase_core: ^0.2.5
This is the code that gives the error.
The output of Packages get :
C:\flutter\bin\flutter.bat --no-color packages get
Running "flutter packages get" in trial_one...
Error on line 21, column 5 of pubspec.yaml: A dependency may only have one source.
sdk: flutter
^^^^^^^^^^^^^^
pub get failed (65)
Process finished with exit code 65
I followed the exact instructions on the Add Firebase to Flutter site. But still I get this error.
Ad
Answer
The indentation is actually not good, here's the correct one :
dependencies:
flutter:
sdk: flutter
firebase_core: ^0.3.1+1
Hope it's help !!
Ad
source: stackoverflow.com
Related Questions
- → How can I query Firebase for an equalTo boolean parameter?
- → How can I access nested data in Firebase with React?
- → Firebase simple blog (confused with security rules)
- → Removing item in Firebase with React, re-render returns item undefined
- → AngularJS Unknown Provider Error (Firebase & AngularFire)
- → How do you pass top level component state down to Routes using react-router?
- → "this" is null in firebase query function in reactjs
- → Angular Module Failed to Load
- → Multiple dex files define Lcom/google/android/gms/internal/zzrx;
- → Joining Firebase tables in React
- → How can I make add firepad to my reactjs project?
- → How to use Cloud Functions for Firebase to prerender pages for SEO?
- → React.js component has null state?
Ad