Debugging log · Install
INSTALL_FAILED_INSUFFICIENT_STORAGE
I tried to install a build and it failed with INSTALL_FAILED_INSUFFICIENT_STORAGE — on an emulator that, as far as I could tell, had gigabytes free. The error seems to be lying, and that's what makes it confusing. "Space" here doesn't always mean what the device's storage screen shows, and the usual cause isn't a genuinely full disk.
The short version: the installer couldn't get the room it needed, which on a dev emulator or test device is usually leftover junk, a too-small emulator image, or a stale install state — not a literally full drive. Clear app data, wipe or enlarge the emulator, or uninstall the old copy, and it installs.
The error
adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
Why it happens even with space "free"
Installation needs working room beyond the final app size — temporary copies during install, dex optimization, and a safety margin the system insists on. On an emulator the configured storage can be small even when the host machine is huge, and failed or partial installs can leave data behind that eats the margin. So the device-level "free space" number and the space the installer can actually claim aren't the same thing, which is why it fails while the storage screen looks fine.
Fixes on an emulator
- Wipe data. In Device Manager, choose your AVD → Wipe Data. This clears accumulated junk from past installs and is the fastest fix.
- Cold boot. Restart the emulator fresh rather than from a snapshot, which can carry a bloated state forward.
- Give it more storage. Edit the AVD and raise the internal storage / data partition size if it was created small. A tiny default partition fills up quickly with a real app plus its data.
- Recreate the AVD. If it's been around a long time, a fresh one is cleaner than fighting an old one.
Fixes on a real device
- Uninstall the old copy of your app first, then install — a previous version plus its data can be what's consuming the margin.
- Clear genuinely free space. Devices get slow and refuse installs when near full; removing unused apps or media can be the literal fix.
- Clear the package installer's cache if installs keep failing across apps.
Reset a stuck install state
When a prior install went wrong, a clean uninstall-and-reinstall clears the leftover:
adb uninstall com.example.app adb install app-debug.apk
And restarting the adb server clears a stuck installer connection that sometimes masquerades as a storage problem:
adb kill-server adb start-server
On an emulator, "wipe data" solves this far more often than anything clever. Reach for it before you start resizing partitions or debugging your app — the app is rarely the cause; the emulator's accumulated state usually is.
Package and file names above are examples — use your own.