Omar Abdelazeem
Omar Abdelazeem

Reputation: 411

After cloning any flutter project I can not resolve dependencies?

I want to clone open source projects, I face a hole punch of errors after tapping pub get, all dependencies cannot be resolved and many of the code is out of date, so how can I overcome this?

a sample of errors

Upvotes: 0

Views: 1681

Answers (4)

Robsen Teshoma
Robsen Teshoma

Reputation: 1

run this

( flutter pub add cupertino_icons:^1.0.6 )

on terminal of you project directory it resolve the problem

and with pubspec.yaml->environment: sdk: ">=2.12.0 <4.0.0" this one makes to take any version of dart and flutter

then run flutter pub get

Upvotes: 0

Abdul Majid
Abdul Majid

Reputation: 127

Whenever you clone the project from Github try to open it with flutter sdk version 1.17.0 or 1.22.4 after seeing the first commit of the project then the problem seems to be solved.

but here it seems that you got problem with two dependencies try to resolve that by not mentioning any version in yuml file.

Upvotes: 1

Abbasihsn
Abbasihsn

Reputation: 2171

This problem is due to the conflict between dependency versions. You are using two dependencies that need different version of intl:

  1. flutter_localization
  2. openfluttercommerce

in your pubspec.yaml change the version of intl from 0.16.0 to 0.17.0. It may cause another conflict with other dependencies that may depend on 0.16.0 version of intl. If it accurs, you need to change the version of utilized dependencies to whatever need the same version of intl.

Upvotes: 1

Mofidul Islam
Mofidul Islam

Reputation: 520

Please use intl 0.17.0 to resolve the issue

Upvotes: 1

Related Questions