-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Fixing Version Solving Failed Errors | ||
|
||
When you get a "version solving failed" error, how can you fix it? | ||
|
||
Some useful tips: | ||
|
||
1. Use flutter pub upgrade, don't change versions manually 💡 | ||
2. Read the error logs 🧐 | ||
3. Remove all version constraints 👻 | ||
4. Update your Podfile 🍏 | ||
5. Update the Android project settings 🤖 | ||
|
||
![](213.1.png) | ||
|
||
<!-- | ||
Updating dependencies inside old projects? The "version solving failed" error is quite common. | ||
How to Resolve It | ||
1. Don’t change versions manually, use flutter pub upgrade instead. | ||
2. Read the error log. Sometimes, the answer you need is just there. | ||
3. Remove the version constraints from all conflicting packages, then run flutter pub get again and restore the version from pubspec.lock | ||
Afterwards, run dart fix --apply to fix your old Dart code. | ||
Additional steps for iOS & Android Builds | ||
4. Update Podfile and Podfile.lock. Useful steps: | ||
- Update the min iOS version in the Podfile | ||
- Run rm Podfile.lock && pod repo update | ||
5. Upgrade Gradle, Java, NDK version on Android | ||
--> | ||
|
||
--- | ||
|
||
Some more details: | ||
|
||
1. "flutter pub upgrade" is your friend. It will try to resolve all dependencies without causing conflicts | ||
2. Be persistent. Inspect the error log closely and see if you can figure it out | ||
3. Remove version constraints from conflicting packages and try again | ||
|
||
![](213.2.png) | ||
|
||
<!-- | ||
Some more details: | ||
1. Don’t change versions manually, use flutter pub upgrade instead. It will resolve all dependencies, ignoring the versions in pubspec.lock. You can also use flutter pub upgrade --major-version. | ||
2. Read the full error log. Sometimes, the answer you need is just there. | ||
3. Remove the version constraint from all conflicting packages, then run flutter pub get again and restore the version from pubspec.lock | ||
--> | ||
|
||
--- | ||
|
||
Here's some more info about "flutter pub upgrade" | ||
https://x.com/biz84/status/1848646896170000843 | ||
|
||
--- | ||
|
||
If you need to update the Android project settings, this script may help: | ||
https://x.com/biz84/status/1858451367959855404 | ||
|
||
--- | ||
|
||
|
||
| Previous | Next | | ||
| -------- | ---- | | ||
| [Adding a Privacy Manifest in Xcode](../0212-xcode-privact-manifest/index.md) | | | ||
|
||
<!-- TWITTER|https://x.com/biz84/status/1864283511852527815 --> | ||
<!-- LINKEDIN|https://www.linkedin.com/posts/andreabizzotto_when-you-get-a-version-solving-failed-error-activity-7270050610329100289-0I9m --> | ||
<!-- BLUESKY|https://bsky.app/profile/codewithandrea.com/post/3lci5gzmagc27 --> | ||
|