flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.83k stars 27.65k forks source link

Flutter pub get issues. #143071

Closed Jossyboydgenius closed 10 months ago

Jossyboydgenius commented 10 months ago

Steps to reproduce

A solution to the issues I'm running into.

Actual results

I can't implement the changes made on my pubspec.yaml, It's throwing me error messages even after running all the command line suggested and also watched videos, used chatGPT as well but to no avail.

Logs

MacBook-Pro myapp % flutter pub get Resolving dependencies... matcher 0.12.16 (0.12.16+1 available) material_color_utilities 0.5.0 (0.8.0 available) meta 1.10.0 (1.12.0 available) path 1.8.3 (1.9.0 available) test_api 0.6.1 (0.7.0 available) web 0.3.0 (0.4.2 available) Got dependencies! 6 packages have newer versions incompatible with dependency constraints. Try flutter pub outdated for more information.

Flutter Doctor output

MacBook-Pro myapp % flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.9, on macOS 14.3 23D56 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [!] Xcode - develop for iOS and macOS (Xcode 15.2) ✗ Unable to get list of installed Simulator runtimes. [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.86.0) [✓] Connected device (2 available) [✓] Network resources

! Doctor found issues in 1 category.

dam-ease commented 10 months ago

Hello @Jossyboydgenius. Are you referring to the logs you are getting above after running flutter pub get, they are indications that there are packages with newer versions incompatible with dependency. You can upgrade these packages to the ones indicated in the bracket to see if you experience any issues. Your question is best suited for support channels like StackOverflow, so please ask the same there for solutions if any. Please also see flutterhelp for resources and ask questions like this. Closing this as this doesn't seem to be an issue with flutter itself, if you disagree, please comment and I'll reopen this. Thank you!

Jossyboydgenius commented 10 months ago

I upgraded the packages, and when I saved it showed me the error below: Because every version of flutter_test from sdk depends on web 0.3.0 and myapp depends on web ^0.4.2, flutter_test from sdk is forbidden. So, because myapp depends on flutter_test from sdk, version solving failed. exit code 1.

It repeats the same error across the 6 packages till downgrade them all to the suggested version, but still shows me the 6 packages have newer versions incompatible with dependency constraints.

Trust me I've done everything I could even tried a remote desktop when I called out for help but still all the same. It's frustrating.

Please help the newbie in flutter.

github-actions[bot] commented 9 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.