zubairehman / flutter_boilerplate_project

A boilerplate project created in flutter using MobX and Provider.
http://zubairehman.surge.sh/
MIT License
2.26k stars 908 forks source link

boilerplate depends on intl ^0.16.1, version solving failed #88

Closed nimitsolanki closed 3 years ago

nimitsolanki commented 3 years ago

[flutter-boilerplate-project-master] flutter pub get Running "flutter pub get" in flutter-boilerplate-project-master...
Because boilerplate depends on flutter_localizations any from sdk which depends on intl 0.17.0, intl 0.17.0 is required.

So, because boilerplate depends on intl ^0.16.1, version solving failed. pub get failed (1; So, because boilerplate depends on intl ^0.16.1, version solving failed.) exit code 1

parse-code commented 3 years ago

same problem

MuhammadSufyanMalik commented 3 years ago

Does anyone find the solution for the above problem?

MuhammadSufyanMalik commented 3 years ago

[flutter-boilerplate-project-master] flutter pub get Running "flutter pub get" in flutter-boilerplate-project-master... Because boilerplate depends on flutter_localizations any from sdk which depends on intl 0.17.0, intl 0.17.0 is required.

So, because boilerplate depends on intl ^0.16.1, version solving failed. pub get failed (1; So, because boilerplate depends on intl ^0.16.1, version solving failed.) exit code 1

update intl to 0.17.0

ictnmd commented 3 years ago

updated intl to 0.17.0 but f_logs need 0.16.1

ictnmd commented 3 years ago

I've just solved by add this to pubspec.yaml dependency_overrides: intl: any

zubairehman commented 3 years ago

for now, you can use dependency_overrides as mentioned by @ictnmd. However, I have been working on migrating the project to null safety and 2.0.

You can also delete the dependency of f_logs from your pubspec if you are not using it.

MuhammadSufyanMalik commented 3 years ago

for now, you can use dependency_overrides as mentioned by @ictnmd. However, I have been working on migrating the project to null safety and 2.0.

You can also delete the dependency of f_logs from your pubspec if you are not using it.

What about the Infinite loop issue? I am facing after this. after running this , flutter packages pub run build_runner watch

husbycodereis commented 3 years ago

currently, problem is not with dependency versions. Even if you patch the problem by overriding, still the problem is with build_runner that gets stuck in the loop by giving the error below;

Bad state: Future already completed [SEVERE] inject_generator:inject_generator on lib/ui/home/home.dart:

I think the reason might be that inject_generator has a dependency for an old version of the analyzer and with Flutter 2.0 analyzer has to be updated to the latest version.

ghost commented 3 years ago

You should use flutter sdk < 2.0. In my case, I fix problem by download another SDK version, v1.22.6 (Stable channel for MacOs). You can search with keyword "downgrade flutter sdk" or reinstall flutter sdk.

gc-robotics commented 3 years ago

You should use flutter sdk < 2.0. In my case, I fix problem by download another SDK version, v1.22.6 (Stable channel for MacOs). You can search with keyword "downgrade flutter sdk" or reinstall flutter sdk.

I have just checked out the code. This is in pubspec:

environment:
  sdk: ">=2.6.0 <3.0.0"

So, the original code is actually using a version >2..

am I completely wrong on this?

MuhammadSufyanMalik commented 3 years ago

You should use flutter sdk < 2.0. In my case, I fix problem by download another SDK version, v1.22.6 (Stable channel for MacOs). You can search with keyword "downgrade flutter sdk" or reinstall flutter sdk.

Exactly

ghost commented 3 years ago

You should use flutter sdk < 2.0. In my case, I fix problem by download another SDK version, v1.22.6 (Stable channel for MacOs). You can search with keyword "downgrade flutter sdk" or reinstall flutter sdk.

I have just checked out the code. This is in pubspec:

environment:
  sdk: ">=2.6.0 <3.0.0"

So, the original code is actually using a version >2..

am I completely wrong on this?

I think that you confused on Dart SDK and Flutter SDK. You can find the answer here

zubairehman commented 3 years ago

Hi @all,

I have updated the DI library for this boilerplate template, please go through feature/null-safety branch for more details. Feel free to reach out to me if you find any issues.

Note: I will merge the changes into master as soon as I am done testing and implementing other features.

Thanks.