Flutter INSTALL_FAILED_VERSION_DOWNGRADE?
Resolve APK Installation Conflicts
You try to install your Flutter app via flutter install or adb install, and you get this dreaded error. This happens when the APK you're installing has a lower versionCode than the app already installed on the device. This guide shows you exactly how to fix it — from updating versionCode to using adb override flags and handling signing issues.
Why Does Version Downgrade Happen?
versionCode integer (not the user‑facing versionName) to determine if an APK is newer or older. If you build an APK with a lower versionCode than the one already installed, the system blocks the installation to prevent downgrading. This is a protective measure. Common causes: forgetting to increment versionCode after a release, using debug and release builds with different codes, or signing with different keys. This guide covers all scenarios.
Step‑by‑Step Q&A
✅ Key Takeaways — Hassle‑Free APK Installation
- Always increment versionCode in
pubspec.yaml(orbuild.gradle) for each release. - Use semantic versioning for versionName, but keep versionCode as an ever‑increasing integer.
- Uninstall the old app if you don't need its data, or use
adb install -r -dto force downgrade. - Check signing keys — a different signature may also cause conflicts.
- Use flavors to maintain separate version codes for different environments.
0 Comments
thanks for your comments!