I encountered an annoying error when I was trying to create a virtual device in AVD Manager. Looking at idea.log file (which located at ~/.AndroidStudio2.3/system/log) I found this
ERROR - ard.ConsolidatedProgressStep$1 - Unable to run mksdcard SDK tool. com.android.tools.idea.welcome.install.WizardException: Unable to run mksdcard SDK tool. at com.android.tools.idea.welcome.install.CheckSdkOperation.perform(CheckSdkOperation.java:130) at com.android.tools.idea.welcome.install.CheckSdkOperation.perform(CheckSdkOperation.java:39) at com.android.tools.idea.welcome.install.InstallOperation.execute(InstallOperation.java:68) ...
WARN - vdmanager.AvdManagerConnection - /home/user/Android/Sdk/emulator/mksdcard: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory WARN - vdmanager.AvdManagerConnection - Failed to create the SD card. WARN - vdmanager.AvdManagerConnection - Failed to create sdcard in the AVD folder.
This is strange because I’m pretty sure that I do have libgcc installed.
ldconfig -p | grep libgcc libgccpp.so.1 (libc6,x86-64) => /lib64/libgccpp.so.1 libgcc_s.so.1 (libc6,x86-64) => /lib64/libgcc_s.so.1
but mksdcard couldn’t run
ldd ~/Android/Sdk/emulator/mksdcard linux-gate.so.1 (0xf77a9000) libgcc_s.so.1 => not found libc.so.6 => /lib/libc.so.6 (0xf75a2000) /lib/ld-linux.so.2 (0xf77ab000)
It turned out that mksdcard use the 32-bit version of libgcc. So I fixed this by installing the 32-bit version of libgcc.
dnf install -y libgcc.i686
I’ll leave it here, just in case it also happens to you. Happy coding everyone.