0
votes

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

2
Remove version from "path: 1.6.4" -> "path:" and run flutter pub get - Nuts
I receive this error now : Compiler message: ../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/rate_my_app-0.6.0+2/lib/src/dialogs.dart:272:17: Error: No named parameter with the name 'onRatingChanged'. onRatingChanged: (rating) { ^^^^^^^^^^^^^^^ ../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/smooth_star_rating- - Alex Ali
rate_my_app version is incompatible with something... github.com/Skyost/RateMyApp/issues/44 according to this issue, might need to downgrade firebase. - Nuts
Maybe try and downgrade your flutter version - Nuts
Nuts you are right I think I need to downgrade flutter version - Alex Ali

2 Answers

2
votes

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
0
votes

You can also just simply replace 1.7.0 with 1.6.4 as the error says.