Learn Few Effective Solutions To Fix Android Emulator Installation Error – “Install Failed Insufficient Storage”!
Overview: Are you getting installation error “INSTALL_FAILED_INSUFFICIENT_STORAGE” on Android Emulator while running an application. If so, then this post offer different solutions that will help you to fix Android emulator installation error “INSTALL_FAILED_INSUFFICIENT_STORAGE”. So, just go through the post and solve the issue by yourself.
Let’s start with real user practical scenario!
Practical Scenario 1: A User Getting Install Failed Insufficient Storage Error When Ionic Emulate Android
When I am running ionic emulate android, it building APK and opening emulator, but showing error that failure (Install failed insufficient storage ) and emulator not showing app.
Source: Ionic Forum
Practical Scenario 2: A User Experiencing Install Failed Insufficient Storage While Installing App From Android Studio
I have a problem with installing an apk of my app on my phone from Android Studio. Every time i tried i got this error message:
09/10 22:40:00: Launching app $ adb push C:\Users\pokef\AndroidStudioProjects\Runescape\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.myapps.myproductions.rsstats. $ adb shell pm install -r "/data/local/tmp/com.myapps.myproductions.rsstats." pkg: /data/local/com.myapps.myproductions.rsstats. Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE] $ adb shell pm uninstall com.myapps.myproductions.rsstats. DELETE_FAILED_INTERNAL_ERROR Error while Installing APK
I know there are a lot of threads out there talking about this problem, but Ive already tried everything. Im certain i have enough storage, i cleared all caches, i uninstalled all previous versions, i changed the manifest to “android:installLocation=”preferExternal” , i restarted my phone etc, so please dont mark this as a duplicate.
This problem only happens since i changed the package path from com.example.myapp etc. to com.myapps.myproductions.rsstats. Im sure that I correctly adapted all paths in the files to this location. What else could I try?
Just like above practical scenarios, there are many Android Developer who faces “INSTALL_FAILED_INSUFFICIENT_STORAGE” error while they try to run the application on the Emulator.
The error message is displayed as:-
Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
So, how do you fix this error?
Well, there are several solutions as per several causes. So, let’s get to the solution section.
Solution 1: Restart The AVD/Restart The Android Emulator Or Create A New AVD
Things get automatically fixed in most of the cases when you restart the device. In this case, you can restart the AVD (Android Virtual Machine) on which you are installing the app or testing the project on.
In some cases, things get so bad that you have to restart the emulator as well.
However, if you are still getting the same error, then you can delete the AVD and create a new one. Here how to do this: Window >Android SDK AVD Manager >Delete >New.
Solution 2: Increase Android Emulator’s Internal Memory Storage
The Android Emulator default internal storage is 64MB, due to which you may get INSTALL_FAILED_INSUFFICIENT_STORAGE error message.
To fix this issue, you can increase the Android Emulator’s internal memory in the Eclipse launch configuration for your Android app with the additional parameter: “partition-size 1024”.
To do this follow the below steps:
- Right-click the root of your Android Project.
- Go to “Run As”, and then click on “Run Configuration”.
- Select your “Android Application” from the left section.
- Then go to “Target” tab. Located on the right side of the window.
- Scroll down and look for “Additional Emulator Command Line Options” and add “-partition-size 1024” there.
- Finally, Click on “Apply” to save changes and then click on “Run” to use your emulator.
Solution 3: Delete Both The APK Files
First of all you need to know how an Android app installation or update works. For example, first time when an app is installed then the APK file is saved as /data/app/-1.apk (1.apk). And when the app is to be updated then the updated APK file is saved as /data/app/-2.apk (2.apk).
Now you have to understand the point. When an updated app is about to get install while the old APK file was not deleted then 1.apk stays where it was and the system does not going to place 2.apk instead it display the installation error “INSTALL_FAILED_INSUFFICIENT_STORAGE”.
Hence, you have to delete both the APK files, to do so follow the below steps:
Simply uninstall the app. Find the path of both the APK files and use your own method to delete them all.
Alternatively, you can also delete both the apk file by running the following command:
adb shell “pm uninstall “
adb shell “rm -rf /data/app/-*”
You May Also Like:
- How To Fix Android Error “Process System Isn’t Responding”
- How To Fix “android.process.acore keeps stopping” Error
- [Fixed]: “System UI isn’t responding. Do you want to close it?” Error
- Solved: “Android Is Starting” Followed By “Optimizing App” Issue
Solution 4: Add android:installLocation attribute
You can also fix install_failed_insufficient_storage error by adding android:installLocation attribute.
Below follow how to do it:
In your AndroidManifest.xml file, within the manifest tag, add android:installLocation=”preferExternal”
Next go to Settings> Storage and then click on cached data and then clear the cache data on your device. This will clear the cache and free up the space.
Now reconnect your device. Clean your project and then again run it on the device. The project will run on your device without any error.
I hope above mentioned-solutions have helped you in fixing the Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE on Android emulator. Just follow the solution one-by-one and see if problem solved or not.