The current Dart SDK version is x; package requires SDK >= y Flutter / Dart Origin: On your device Last updated 4 Nov 2026

Dart pub: The current Dart SDK version is 2.19.0. Because app requires SDK version >=3.0.0 <4.0.0, version solving failed

A package (or your own pubspec) requires a newer Dart SDK than the one your Flutter installation provides.

Exact message you may see The current Dart SDK version is Because app requires SDK version >=Because requires SDK version >=3.0.0 <4.0.0, version solving failedThe current Dart SDK version is 2.19.0requires SDK version >=3.3.0 <4.0.0
Seen on: Flutter

Meaning

Upgrade Flutter (flutter upgrade) or lower the dependency version/environment: sdk: range. The first line shows your current SDK version; compare it with the required range. CI may be using a different Flutter version than local.

Common causes

  • Old Flutter/Dart SDK installed
  • pubspec environment.sdk higher than installed
  • Package updated to require Dart 3
  • CI using a cached older Flutter
  • Multiple Flutter installs (FVM) with wrong version

⚡ Quick fix

  1. flutter upgrade or flutter channel stable
  2. Pin an older package version compatible with your SDK
  3. Use FVM / CI to fix the Flutter version consistently

Detailed fix by platform

Flutter

  1. flutter --version shows Dart SDK; fvm use 3.22.0 pins the project version

How to diagnose

  1. SDK — Installed version?
  2. Range — pubspec constraint?
  3. CI — Same Flutter?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Android license status unknown / licenses not accepted — flutter doctor: Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses (Flutter / Dart)Android license statu…BoxConstraints forces an infinite width — Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row) (Flutter / Dart)BoxConstraints forces…Cleartext HTTP traffic not permitted — Flutter (Android): java.io.IOException: Cleartext HTTP traffic to api.example.com not permitted (Flutter / Dart)Cleartext HTTP traffi…cmdline-tools component is missing — flutter doctor: Android SDK is missing command-line tools; download from https://goo.gl/XxQghQ — cmdline-tools component is missing (Flutter / Dart)cmdline-tools compone…Dependency requires compileSdk 34 or later — Android Gradle: Execution failed for task ':app:checkDebugAarMetadata'. Dependency requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs (Flutter / Dart)Dependency requires c…Error: Couldn't resolve the package — Dart: Error: Couldn't resolve the package 'x' in 'package:x/x.dart' (Flutter / Dart)Error: Couldn't resol…version solving failed (pub get) — Dart pub: Because app depends on intl ^0.19.0 and flutter_localizations from sdk depends on intl 0.18.1, version solving failed (Flutter / Dart)version solving faile…The curre…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.