I am new to Android development and I opted for React Native instead of native. When I run npm run android
I am getting the following error:
com.android.ddmlib.InstallException: INSTALL_FAILED_INSUFFICIENT_STORAGE
at com.android.ddmlib.Device.installRemotePackage(Device.java:1133)
at com.android.ddmlib.Device.installPackage(Device.java:963)
at com.android.ddmlib.Device.installPackage(Device.java:939)
at com.android.ddmlib.Device.installPackage(Device.java:928)
at com.android.builder.testing.ConnectedDevice.installPackage(ConnectedDevice.java:126)
What does this mean, and how can I fix it?
I am using Android Studio 3.6.3
The npm install command may fail to work because of many reasons. When the command doesn’t work, you need to check the output first and see what specific error you have. Try a Google search to fix the issue.
When you have a package-lock.json file in your project, then npm will check the integrity of the package you downloaded with the one specified in the lock file. When the checksum of the package is different, then npm will stop the installation and throw the integrity check failed error.
First, download Android data backup and recovery software to backup Android files to PC, to ensure that nothing is going to lose during the fix; and then apply each of the suggested methods to resolve the insufficient storage issue while installing apps.
It's said that 9 out of 10 Android users have been facing the insufficient space on Android while installing an app or whatever, even though there is a plenty of storage space on both the internal memory or external SD card. How did the failure come? Primarily, you got to know how an Android app installation or update takes effect.
It means that the device you're running it on (an emulator in my case) is running low on internal (in most cases) or external storage.
To increase the emulator's space follow the following steps (refer to GIF for exact directions):
Your device does not have enough space, try making space by removing unwanted files on your device(Emulator/Phone)
I had an older version of my app installed.
I uninstalled it from the phone, and re-install the app (via the react-native run-android
command) and it worked.
Clear your emulator/ phone memory, where you are installing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With