あるSEのつぶやき・改

ITやシステム開発などの技術に関する話題を、取り上げたりしています。

(Solved)React Native:INSTALL_FAILED_INSUFFICIENT_STORAGE

I faced bellow error when I ran expo project which was ejected.

FAILURE: Build failed with an exception.

What went wrong:

Execution failed for task ':app:installDebug'.

com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_INSUFFICIENT_STORAGE

This cause is shortage of virtual device's storage capacity.

Run below command in project root, you figure out about shortage size of storage.

$ adb shell
root@generic_x86_64:/ # df
Filesystem               Size     Used     Free   Blksize
/dev                   749.2M    48.0K   749.2M   4096
/sys/fs/cgroup         749.2M    12.0K   749.2M   4096
/mnt                   749.2M     0.0K   749.2M   4096
/system                  1.5G     1.4G    71.3M   4096
/cache                  61.0M    64.0K    60.9M   4096
/storage               749.2M     0.0K   749.2M   4096
/data                  774.9M   712.3M    62.6M   4096

/data partition is almost full 100%.

You can expand storage size from editing config.ini.

When Mac.

$ vim /Users/(User Name)/.android/avd/(Virtual Device Name).avd/config.ini

I changed disk.dataPartition.size from 800M to 1024M.

disk.dataPartition.size=1024M

Restart virtual device and check disk storage size again.

/data                  997.1M   233.0M   764.1M   4096

Everything OK. :-)