Ubuntu - Error: Failed to create the SD card

I had the same error like you and I have just solved it, so maybe it can help you (though I don't think your error is caused by the same problem like me).

I found that all tools in ../tools don't have the permission to excute, so I used

chmod -R 777 ../tools

from the command line and it finally works


On Ubuntu 16.04 LTS x64, using Android Studio 2.1 (also tested on 2.3.3), run from a terminal:

sudo apt-get install lib32stdc++6

So I found the problem. I was using a 64-bit Linux install, which did not have the ia32-libs package installed by default. The mksdcard utility will not run without this package. After installing it, I was able to build the AVD without a problem using the AVD manager.