INSTALL_FAILED_INSUFFICIENT_STORAGE Error when i ran npm run android command

Viewed 25740

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

5 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

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

try to run your project using

npx react-native run-android

Or wipe data from emulator options this will delete all extra apps from your device giving you some extra memory. enter image description here

or

cd android ./gradlew uninstallAll

to uninstall any app instance in your emulator device

Related