FlutterIntermediate 2 min readTroubleshooting guide

Flutter pub get version solving failed: inspect constraints

Read the conflicting package constraints, check the Dart SDK range and update a compatible dependency set without blind overrides.

On this page

When an SDK upgrade triggered the conflict, use the FlutterFever upgrade workflow to review the whole compatibility change rather than overriding the solver blindly.

Symptom

flutter pub get cannot resolve a dependency graph and explains which package versions require incompatible ranges. This happens before application compilation.

Read the conflict chain

Identify the direct dependencies you selected, the transitive package mentioned by the solver and the project’s Dart SDK range. The useful part of the message is the relationship between those constraints, not only the final “version solving failed” line.

Choose a compatible set

Inspect available versions and the dependency authors’ migration notes. A newer dependency may require a newer Dart SDK; a legacy plugin may impose an older transitive range. Decide whether to update the direct package, change the SDK intentionally or replace an unsupported dependency.

Use overrides only with understanding

A dependency override can force resolution without proving runtime or API compatibility. Treat it as a deliberate temporary exception with tests and a removal plan, not a universal fix.

Preserve reproducibility

For an application, keep the relevant lockfile in version control. Deleting it changes the graph and can hide what changed. Record the successful graph alongside the source revision.

Worked example

These commands run from a local project terminal.

flutter --version
flutter pub outdated
flutter pub deps
flutter pub get

Read the result

Apply only the change that matches the observed cause. Keep the original diagnostic output so you can compare the same command after the change.

Read the solver as a constraint explanation

Find the two incompatible requirements and identify which direct dependency introduced each. Then choose a compatible set intentionally. Deleting caches cannot make contradictory version ranges overlap.

If an SDK change triggered the failure, compare the package’s required Dart range with the Dart version bundled by that Flutter SDK. After resolution succeeds, inspect the lockfile change and run analysis and the affected feature tests. SDK download selection and package boundaries help separate environment from application design.

Practice and verification

Confirm pub get succeeds, inspect the changed lockfile and run analysis and tests. A resolved graph can still contain incompatible application calls, so rebuild the feature that uses the changed package.

How this topic connects

Understand first

Apply it next

Find your next idea

Search lessons, code examples and projects.

Type a few words to start exploring.