Fix- INSTALL_FAILED_INSUFFICIENT_STORAGE on Android emulators
November 19, 2021
How to fix INSTALL_FAILED_INSUFFICIENT_STORAGE on Android emulators:
INSTALL_FAILED_INSUFFICIENT_STORAGE is a common error. You might face it in Android, React-native or Flutter projects. The reason is that your emulator internal memory is full and you don’t have any more space to install this app.
In this post, I will show you how to fix it.
Below is the full error and description:
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:installDebug'. > java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_INSUFFICIENT_STORAGE * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 6s
Fix 1: Uninstall your apps:
This is the easiest way to fix this issue. If we work on multiple projects, often we forget to clean the emulator. Also, if different environment of your app is installed on the emulator(with different package names), you can uninstall the apks which are not required.
To uninstall any app, you need to long click on its icon, click on App Info and click on Uninstall to uninstall the app.
Other than that, you can also use adb to uninstall an app.
You need the package name of the app. Open a terminal and run the below command to uninstall an app:
adb uninstall <package>
Once done, you can try again to install the app. It should work.
Fix 2: Clear your emulator data:
You can reset the content of an emulator. It will delete everything and you can do a fresh boot. Emulator data can be cleaned from Android Studio.
Open Android Studio, go to Tools -> AVD Manager. It will show you the list of your virtual devices.
Click on the arrow button at the end of an emulator and click on Wipe data.
It will show a popup to confirm your action. Click on the Yes button and it will wipe the data of the emulator.
Note that, you can’t wipe the data if the emulator is running. You need to close it first to do that.
Fix 3: Increase internal memory of the emulator:
If you want to increate the memory of an emulator without deleting it, you can. Click on the rightmost arrow icon and click on edit.
It will open a window with different editable options.
Click on Show advanced settings. It will show you the memory and storage information for that emulator.
Change the internal storage or increase it and click on Finish.
Now, start your emulator. If it shows any issue, you can clear the data as shown in step 2 above.