Skip to content

Commit

Permalink
Tip 213
Browse files Browse the repository at this point in the history
  • Loading branch information
bizz84 committed Dec 4, 2024
1 parent 43b9cb0 commit 9812a1b
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This repo now has a companion app! [Download it here](https://fluttertips.dev/)
| ID | View on GitHub (this repo) | X Post | LinkedIn Post | Bluesky Post | Link on [codewithandrea.com](https://codewithandrea.com/) |
| -- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------ | ------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| 213 | [Fixing Version Solving Failed Errors](tips/0213-fixing-version-solving-failed-errors/index.md) | [link](https://x.com/biz84/status/1864283511852527815) | [link](https://www.linkedin.com/posts/andreabizzotto_when-you-get-a-version-solving-failed-error-activity-7270050610329100289-0I9m) | [link](https://bsky.app/profile/codewithandrea.com/post/3lci5gzmagc27) | |
| 212 | [Adding a Privacy Manifest in Xcode](tips/0212-xcode-privact-manifest/index.md) | [link](https://x.com/biz84/status/1863537508899860770) | [link](https://www.linkedin.com/posts/andreabizzotto_did-you-know-starting-november-12-2024-activity-7269303842813489154-k5iw) | [link](https://bsky.app/profile/codewithandrea.com/post/3lccxnqg5zs2j) | |
| 211 | [Fix for Missing Compliance Warning in App Store Connect](tips/0211-fix-missing-compliance-warning/index.md) | [link](https://x.com/biz84/status/1862524737651376212) | [link](https://www.linkedin.com/posts/andreabizzotto_tired-of-seeing-the-missing-compliance-activity-7268290796854902784-iNzJ) | [link](https://bsky.app/profile/codewithandrea.com/post/3lc3wqvcqus2d) | |
| 210 | [Material Icons Theme (VSCode Extension)](tips/0210-material-icons-theme-vscode-extension/index.md) | [link](https://x.com/biz84/status/1861698580727075132) | [link](https://www.linkedin.com/posts/andreabizzotto_tired-of-the-old-boring-vscode-default-theme-activity-7267464786907389952-w42m) | [link](https://bsky.app/profile/codewithandrea.com/post/3lbw7cepvg22v) | |
Expand Down
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.
76 changes: 76 additions & 0 deletions tips/0213-fixing-version-solving-failed-errors/index.md
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 -->

0 comments on commit 9812a1b

Please sign in to comment.