Help for owners
My old Flutter app no longer compiles
Short answer
An unmaintained Flutter app often fails because the tools around it moved on. Dart 3 requires null safety, so packages that were never migrated stop resolving. The code is usually recoverable, but it needs a planned update to current versions, not a quick patch. Save a copy first and do not delete anything.
Does this sound like your situation?
- The app has not been updated for a long time and will not build now.
- The first error mentions version solving or an SDK constraint.
- A package says it does not support null safety.
- The developer who built it is no longer around.
- I need a small change but nobody can compile the project.
Why does this happen?
Dart 3 makes null safety mandatory
The Dart 3 migration guide states that null safety is built in and cannot be turned off. Code written before that has to be migrated.
Confirmed by dart.dev
Packages that were not migrated fail to resolve
The same guide says packages without null safety make pub get fail during version solving, and that libraries below the minimum language version cause errors.
Confirmed by dart.dev
Migration tools were removed
dart migrate and related commands no longer exist in Dart 3, so the old shortcut is gone. The guide says to migrate with an older Dart SDK first, which needs care.
Confirmed by dart.dev
Version ranges and the lock file decide what is installed
Dart packages declare a range of acceptable versions, and a lock file records the exact versions chosen. If the lock file is missing, the build may pick versions that differ from what the app was built with.
Confirmed by dart.dev
What can I do about it today?
- Copy the whole project folderBefore anyone touches it, store a full copy, including the lock file and any key or signing files. This is the single most useful step.
- Find the original toolsAsk whoever built it for the Flutter version, or look for the version in project files. Do not guess.
- Check who owns the store accountsThe app stays live while the code is stuck. Make sure you still control the developer accounts.
- Do not rewrite from scratch yetA rewrite is costly and rarely needed. Ask for an assessment of how much of the app is reusable.
- List the changes you actually needA short list of must-have changes helps a developer judge the size of the job.
When should I bring someone in?
- You do not have the source code or only part of it.
- A store requirement forces an update soon.
- Several packages in the project are abandoned.
How do I handle it?
- Assess before promising anythingI try to build the project, list each blocker and tell you which are packages, which are code and which are tools.
- Migrate in the order the tools requireNull safety first where the old tools are needed, then the move to current Dart and Flutter, with the app running at each step.
- Replace what cannot be savedAbandoned packages are swapped for maintained ones, and I explain each swap.
- Hand back something maintainableYou get a project that builds on current tools, a short note on how to build it, and the store release prepared with you.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Is my old app lost?
Usually not, if the code exists. The work is bringing it up to current versions.
Why does the lock file matter?
Dart's documentation says it records the concrete version of every dependency and should be committed for apps, so it helps rebuild the same versions.
Is a rewrite cheaper?
Not always. After an assessment, it is easier to compare updating with rebuilding.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
For your developer: the technical fixes
Because app requires SDK version >=2.15.1 <3.0.0, version solving failed.pub get fails with version solving failed after an SDK or package changepub get failedflutter pub get fails and no packages are downloadedBuild failed due to use of deprecated Android v1 embeddingFlutter build fails because the Android project uses the v1 embeddingNamespace not specified. Specify a namespace in the module's build file.Gradle says the Android namespace is not specifiedPlay Console blocks submitting a release whose app bundle targets an API level below 36Play Console will not accept the release because of its target API level