Because cloud_firestore_web 0.2.1+2 depends on http_parser ^3.1.3 and no versions of cloud_firestore_web match >0.2.1+2 <0.3.0, cloud_firestore_web ^0.2.1+2 requires http_parser ^3.1.3.
And because http >=0.13.0 depends on http_parser ^4.0.0 and cloud_firestore 0.14.4 depends on cloud_firestore_web ^0.2.1+2, http >=0.13.0 is incompatible with cloud_firestore 0.14.4.
So, because markets depends on both cloud_firestore 0.14.4 and http 0.13.2, version solving failed.
pub get failed (1; So, because markets depends on both cloud_firestore 0.14.4 and http 0.13.2, version solving failed.)
I am new in flutter, please help me to solve this issue
name: markets
description: markets
version: 2.0.0+9
environment:
sdk: ">=2.2.2 <3.0.0"
module:
androidX: true
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: 1.0.2
google_maps_flutter: 1.2.0
google_map_location_picker: 4.1.6
mvc_pattern: 6.6.4+2
global_configuration: 2.0.0-nullsafety.0
html: 0.14.0+4
shared_preferences: 2.0.5
flutter_html: ^1.2.0
flutter_svg: ^0.19.3
location: 3.0.2
webview_flutter: 1.0.7
url_launcher: 6.0.2
firebase_messaging: 7.0.3
cached_network_image: 2.5.0
fluttertoast: 8.0.1-nullsafety.0
flutter_staggered_grid_view: 0.4.0-nullsafety.3
intl_utils: 1.9.0
carousel_slider: 4.0.0-nullsafety.0
cloud_firestore: 0.14.4
firebase_auth: 0.18.4+1
firebase_core: 0.5.3
dev_dependencies:
flutter_test:
sdk: flutter
dependency_overrides:
intl: 0.17.0
http: 0.13.2
flutter:
assets:
- assets/cfg/
- assets/img/
fonts:
- family: ProductSans
fonts:
- asset: assets/fonts/ProductSans-Thin.ttf
weight: 100
- asset: assets/fonts/ProductSans-Thin.ttf
weight: 200
- asset: assets/fonts/ProductSans-Light.ttf
weight: 300
- asset: assets/fonts/ProductSans-Regular.ttf
weight: 400
- asset: assets/fonts/ProductSans-Medium.ttf
weight: 500
- asset: assets/fonts/ProductSans-Bold.ttf
weight: 600
- asset: assets/fonts/ProductSans-Black.ttf
weight: 700
- asset: assets/fonts/ProductSans-Black.ttf
weight: 800
- asset: assets/fonts/ProductSans-Black.ttf
weight: 900
flutter_intl:
enabled: true
Try running 'Flutter pub upgrade'. You can type the command in your terminal window in Android Studio. Or if you open your pubspec.yaml file, you'll see the Pub upgrade command along the top, next to Pub get. Running the command will get the newest versions of your libraries and will probably resolve the issue.
If that doesn't work, then try running 'Flutter pub outdated' and 'Flutter pub upgrade --major-versions'.
Edit:
This returns 'Pub get' without error:
cupertino_icons: ^1.0.3
google_maps_flutter: ^2.0.6
#google_map_location_picker: 4.1.7
mvc_pattern: ^7.4.0
global_configuration: ^2.0.0-nullsafety.1
html: ^0.15.0
shared_preferences: ^2.0.6
flutter_html: ^2.1.0
flutter_svg: ^0.22.0
location: ^4.3.0
webview_flutter: ^2.0.9
url_launcher: ^6.0.9
firebase_messaging: ^10.0.3
cached_network_image: 2.5.0
fluttertoast: ^8.0.7
flutter_staggered_grid_view: ^0.4.0
intl_utils: 2.3.0
carousel_slider: ^4.0.0
cloud_firestore: ^2.3.0
firebase_auth: ^2.0.0
firebase_core: 1.3.0
I had to comment out google_map_location_picker because that is an outdated library. The author of that library appears to have abandoned the project. google_maps_place_picker might be a suitable alternative.
Related
I would like to ask for help, I've searched all the answers here in the community and I can't solve my error.
I had to update a personal project to Android sdk 32, but when I try to run the Flutter pub get command I'm having an SDK version error, I'm leaving the pub spec and the error image below.
Error Picture Here
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.17.0 <3.0.0"
dependencies:
dio: ^4.0.0
rxdart: ^0.27.1
bloc_pattern: ^3.0.0
flutter_launcher_icons: ^0.10.0
flutter_translate: ^4.0.3
flutter_localizations:
sdk: flutter
equatable: any
json_annotation: any
freezed_annotation: any
webview_flutter: ^3.0.4
flutter_cache_manager: ^3.3.0
upgrader: ^4.6.1
video_thumbnail: ^0.5.3
## Animation rive
#rive: ^0.7.22
# Native
package_info_plus: ^1.0.3
geolocator: ^9.0.2
path_provider: ^2.0.2
file_picker: ^4.1.6
open_file: ^3.2.1
url_launcher: ^6.0.8
shared_preferences: ^2.0.6
qr_code_scanner: ^1.0.1
cross_file: ^0.3.2
camera: ^0.10.0+3
# Layout
introduction_screen: ^3.0.2
font_awesome_flutter: ^10.1.0
select_form_field: "^2.1.0"
#mask_text_input_formatter: ^2.0.0
another_flushbar: ^1.10.24
flutter_switch: ^0.3.2
flutter_app_badger: ^1.2.0
image_picker: ^0.8.5+3
flutter_neat_and_clean_calendar: ^0.3.8+22
date_utils: ^0.2.0
date_format: ^2.0.2
#flutter_form_builder: ^6.0.1
date_time_picker: ^2.1.0
flutter_rating_bar: ^4.0.0
signature: ^5.2.1
flutter_simple_treeview: ^3.0.0-nullsafety.1
widget_to_image: ^2.0.0
flutter_email_sender: ^5.0.2
in_app_review: ^2.0.2
flutter_typeahead: ^4.1.1
brasil_fields: ^1.5.0
grouped_list: ^5.1.2
mat_month_picker_dialog: ^1.0.1
# Videos Acesso Cameras
video_viewer: ^1.2.6
fijkplayer: ^0.10.1
# Conteudo html
flutter_html: ^3.0.0-alpha.5
## FIREBASE
firebase_core: ^1.13.1
firebase_messaging: ^13.0.3
flutter_local_notifications: ^11.0.1
## Share Social
share: ^2.0.4
flutter:
sdk: flutter
json_serializable: any
build_runner: any
freezed: any
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
dev_dependencies:
mockito: ^5.0.10
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
flutter_icons:
android: "ic_launcher"
ios: true
image_path: "assets/icon/icon.png"
adaptive_icon_background: "assets/icon/icon.png"
adaptive_icon_foreground: "assets/icon/icon.png"
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/img/
- assets/i18n/
- assets/animation/loading.riv
- assets/json/paises.json
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages```
replace your sdk with
sdk: ">=2.15.1 <3.0.0"
I managed to solve this problem, I uninstalled flutter on the mac and installed it again, I think the mac was cached.
When I run my Flutter codes, I get an error like this:
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:firebase_auth
For solutions, see https://dart.dev/go/unsound-null-safety
Restarted application in 922ms.
pubspec.yaml:
name: simto_todolist
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+1
androidX: true
environment:
sdk: ">=2.15.1 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
firebase_auth: ^0.6.2+1
dev_dependencies:
flutter_test:
sdk: flutter
global_configuration: ^1.6.0
flutter_lints: ^1.0.0
get_storage: ^2.0.3
carousel_slider: ^4.0.0
cool_alert: ^1.1.0
timer_count_down: ^2.2.1
modal_bottom_sheet: ^2.0.1
persistent_bottom_nav_bar: ^4.0.2
group_button: ^4.6.0
flutter_signin_button: ^2.0.0
google_sign_in: ^5.2.4
firebase_core: ^1.13.1
flutter:
uses-material-design: true
assets:
- splash1.png
- splash2.png
- splash3.png
- splash4.png
- logo.png
fonts:
- family: Roboto
fonts:
- asset: fonts/Roboto-Bold.ttf
- asset: fonts/Roboto-Light.ttf
- asset: fonts/Roboto-Medium.ttf
- asset: fonts/Roboto-Thin.ttf
I think the problem is in the firabase_auth package. I've searched a lot but couldn't find how to fix the problem.
What is the problem? How can I solve it? Thanks in advance for the help.
#MuhammadJunaidKhalid When I upgrade the firebase_auth version to the latest version, I get this output:
Because no versions of global_configuration match >1.6.0 <2.0.0 and global_configuration 1.6.0 depends on http ^0.12.2, global_configuration ^1.6.0 requires http ^0.12.2.
And because no versions of http match >0.12.2 <0.13.0 and http 0.12.2 depends on http_parser >=0.0.1 <4.0.0, global_configuration ^1.6.0 requires http_parser >=0.0.1 <4.0.0.
And because firebase_auth >=3.3.9 depends on firebase_auth_web ^3.3.9 which depends on http_parser ^4.0.0, global_configuration ^1.6.0 is incompatible with firebase_auth >=3.3.9.
So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.
pub get failed (1; So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.)
exit code 1
The error I got after doing what #Royalindo said:
PS C:\Users\emiry\Desktop\Simto-To-Do-List\simto_todolist> flutter pub get
Because no versions of global_configuration match >1.6.0 <2.0.0 and global_configuration 1.6.0 depends on http ^0.12.2, global_configuration ^1.6.0 requires http ^0.12.2.
And because no versions of http match >0.12.2 <0.13.0 and http 0.12.2 depends on http_parser >=0.0.1 <4.0.0, global_configuration ^1.6.0 requires http_parser >=0.0.1 <4.0.0.
And because firebase_auth >=3.3.9 depends on firebase_auth_web ^3.3.9 which depends on http_parser ^4.0.0, global_configuration ^1.6.0 is incompatible with firebase_auth >=3.3.9.
So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.
Running "flutter pub get" in simto_todolist...
pub get failed (1; So, because simto_todolist depends on both firebase_auth ^3.3.11 and global_configuration ^1.6.0, version solving failed.)
In the Dart file
Add // #dart=2.9 at the top in your main.dart file.
// #dart=2.9 import 'package:flutter/material.dart';
void main() { //... }
Using the command line
flutter run --no-sound-null-safety Or to be specific (say in Chrome)
flutter run -d chrome --no-sound-null-safety
I have downloaded a flutter project and placed the lib, assets and pubsec.yaml files in a new project. After "flutter packages get" There are more than 1k+ error. this the error:
Because fluttermultigrocery depends on flutter_localizations any from sdk which depends
on intl 0.17.0-nullsafety.2, intl 0.17.0-nullsafety.2 is required.
So, because fluttermultigrocery depends on intl ^0.16.1, version solving failed.
pub get failed (1; So, because fluttermultigrocery depends on intl ^0.16.1, version solving failed.)
this are my pubsec.yaml dependencies:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^0.1.3
optimized_cached_image: ^0.1.15
cached_network_image: ^2.3.1
flutter_cache_manager: ^1.4.1 #for cached_network_image
http: ^0.12.2
provider: 4.3.2+2
connectivity: 0.4.9+2
dynamic_theme: ^1.0.1
sembast: ^2.4.7+6
path_provider: ^1.6.14
intl: ^0.16.1
shimmer: ^1.1.1
url_launcher: ^5.5.2
carousel_slider: 2.2.1
firebase_core: ^0.5.0
firebase_messaging: 7.0.0
dev_dependencies:
flutter_test:
sdk: flutter
#flutter_local_notifications:
Just remove the version in dependency which creates problem and it will work
like => firebase_core: (Don't specify version)
firebase_messaging: (Don't specify version)
This is my pubspec.yaml
Working dir: C:\Users\kom.13\AndroidStudioProjects\flutter_app1
C:\src\flutter\flutter\bin\cache\dart-sdk\bin\pub.bat get
Error on line 22, column 2 of pubspec.yaml: Expected a key while parsing a block mapping.
â•·
22 │ fonts:
│ ^
╵
Process finished with exit code 65
name: flutter_app1
description: A new Flutter application.
publish_to:
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: Pacifico
fonts:
- asset: fonts/Pacifico-Regular.ttf
so, you have an indentation issue in the fonts sections. Do this instead:
name: flutter_app1
description: A new Flutter application.
publish_to:
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
fonts:
- family: Pacifico
fonts:
- asset: fonts/Pacifico-Regular.ttf
For reference, check this page: https://flutter.dev/docs/cookbook/design/fonts
I think You have an Error of indentation of which means your fonts are not at the correct position, see mine below code.
fonts:
- family: GraphikWide
fonts:
- asset: fonts/Graphik-Wide-Regular.otf
- asset: fonts/Graphik-Wide-Medium.otf
weight: 400
- family: Gibson
fonts:
- asset: fonts/gibson-regular.ttf
- asset: fonts/gibson-semibold.ttf
weight: 400
- asset: fonts/gibson-light.ttf
weight: 100
just replace your full font code in pubspec with my code then do the changes
I downloaded project from github and tried to run the project but it requires Get Dependencies and when I press Pub Get to for dependencies I receive the following error:
Because every version of flutter_test from sdk depends on path 1.7.0 and fstore depends on
path 1.6.4, flutter_test from sdk is forbidden.
So, because fstore depends on flutter_test any from sdk, version solving failed.
pub get failed (1; So, because fstore depends on flutter_test any from sdk, version solving
failed.)
Here is pubsbec.yaml file:
name: fstore
description: Mobile commerce app by Flutter
version: 1.6.5+33
environment:
sdk: ">=2.2.2 <3.0.0"
dependencies:
logs:
git: https://github.com/pq/logs
flutter:
sdk: flutter
http: 0.12.0+4
html_unescape: 1.0.1+3
provider: 4.0.4
after_layout: 1.0.7+2
font_awesome_flutter: 8.7.0
path: 1.6.4
vector_math: 2.0.8
carousel_pro: 1.0.0
flutter_widget_from_html: 0.3.2+1
configurable_expansion_tile: 1.0.0
timeago: 2.0.26
share: 0.6.3+6
validate: 1.7.0
country_pickers: 1.2.0
shared_preferences: 0.5.6+3
firebase_messaging: 6.0.12
firebase_analytics: 5.0.11
transparent_image: 1.0.0
pull_to_refresh: 1.5.8
localstorage: 3.0.1+4
notification_permissions: 0.4.4
flare_splash_screen: 3.0.1
rate_my_app: 0.6.0+2
page_indicator: 0.3.0
extended_image: 0.7.1
intro_slider: 2.2.9
url_launcher: 5.4.2
firebase_core: 0.4.4 # keep these version as there is new issue
firebase_auth: 0.15.3 # with the latest firebase https://github.com/FirebaseExtended/flutterfire/issues/2084
flutter_webview_plugin: 0.3.10+1
connectivity: 0.4.8+2
random_string: 2.0.1
google_maps_flutter: 0.5.24+1
place_picker: 0.9.11
cached_network_image: 2.0.0
image_picker: 0.6.3+4
uuid: 2.0.4
uni_links: 0.2.0
flutter_staggered_grid_view: 0.3.0
device_apps: 1.0.9
auto_size_text: 2.1.0
flutter_swiper: 1.1.6
flutter_widgets: 0.1.12
video_player: 0.10.8+1
flutter_spinkit: 4.1.2
percent_indicator: 2.1.1+1
animated_text_kit: 2.0.0
wave: 0.0.8
http_auth: 0.2.9
firebase_admob: 0.9.1
facebook_audience_network: 0.5.0
pin_code_fields: 2.4.0
flutter_facebook_login: 3.0.0
webview_flutter: 0.3.19+9
rubber: 0.4.0
flutter_localizations:
sdk: flutter
custom_splash: 0.0.2
apple_sign_in: 0.1.0
google_sign_in: 4.1.4
google_fonts: 0.3.10
flutter_statusbarcolor: 0.2.3
app_settings: 3.0.1
razorpay_flutter: 1.1.2
animated_splash: 1.0.0
firebase_database: 3.1.3
event_bus: 1.1.1
country_code_picker: 1.3.6
flutter_typeahead: 1.8.0
flash: 1.2.3
dev_dependencies:
flutter_launcher_icons: 0.7.4
flutter_test:
sdk: flutter
pedantic: 1.8.0+1 # Analysis
I tried already flutter upgrade but it did not work, is there any solution for this problem because
I have found the solution to this problem, you can use both versions of the path dependency through override_dependency, which will satisfy the requirnments.
Try Following solution:
dependencies:
flutter:
sdk: flutter
dio: ^3.0.9
hive_flutter: ^0.3.0+2
hive: ^1.4.1+1
path: ^1.7.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
dependency_overrides:
path: ^1.6.4
dev_dependencies:
flutter_test:
sdk: flutter
hive_generator: ^0.7.0+2
build_runner: ^1.10.0
You can also just simply replace 1.7.0 with 1.6.4 as the error says.