Resolving Insufficient Storage Error in Android Studio
One of the most annoying errors I regularly get in Android Studio is the one complaining about insufficient storage when launching an app on a virtual device: INSTALL_FAILED_INSUFFICIENT_STORAGE
.
05/31 16:08:52: Launching 'DebugViewPreview' on Pixel 5 API 32.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_INSUFFICIENT_STORAGE
List of apks:
[0] '/Users/.../MyProject/build/MyProject-0.1.0-1.apk'
The device needs more free storage to install the application (extra space is needed in addition to APK size).
Retry
Failed to launch an application on all devices
The solution is quite simple: Open the Device Manager (under Tools-Menu). Then click on the down-arrow on the right for the device where you want to install the app on and select “Wipe Data”.
Careful with the next dialog! Don’t just click it away. Nothing will happen if the device is still running. No data will be wiped and therefore you still won’t be able to install the app on the device.
The device needs to be shut off and closed in order for Android Studio to really be able to wipe the data. The green dot next to the device name needs to disappear.
When clicking the “x” to close the tab of the device it will take a few seconds until the green dot disappeared.
Now, that the device has been shut down and closed, you will be finally able to wipe all the data to finally install your app on the device again.
Hope this saves you a bit of time!
Thank you for reading!
- If you enjoyed this, please follow me on Medium
- Buy me a coffee to keep me going
- Support me and other Medium writers by signing up here