Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

INSTALL_FAILED_INSUFFICIENT_STORAGE Error when i ran npm run android command

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

enter image description here

like image 297
Vignesh packiaraj Avatar asked Jul 12 '20 12:07

Vignesh packiaraj


People also ask

Why is NPM install not working on my Device?

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.

Why does NPM stop installation when package integrity check failed?

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.

How to fix inadequate storage issue on Android device?

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.

Do you have insufficient space on Android when installing an app?

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.


4 Answers

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):

  1. Go to the Android Studio -> AVD Manager, and for your specific emulator go for down arrow button 🔽 & select 'Edit'
  2. Scroll down & click on 'Show Advanced Settings'
  3. Scroll down to Memory and Storage section
  4. Increase (or decrease) the Internal Storage to the desired value

increase emulator space

like image 90
Rishabh Jain Avatar answered Oct 17 '22 03:10

Rishabh Jain


Your device does not have enough space, try making space by removing unwanted files on your device(Emulator/Phone)

like image 37
Neelam Soni Avatar answered Oct 17 '22 01:10

Neelam Soni


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.

like image 8
Michel A. Avatar answered Oct 17 '22 01:10

Michel A.


Clear your emulator/ phone memory, where you are installing

like image 6
mainak Avatar answered Oct 17 '22 01:10

mainak