I see a lot of posts about writing to the SD card, but I believe my problem is different. I am unable to create the SD card during the process of building an AVD.
I
After a lot of installing and not getting any result I found this and it worked.
This happens because some executable files in sdk/tools
cannot be executed. Go to your Android Studio and Android SDK folders and make all directory and files executable by this command:
chmod +x -R *
If you are using Kali, Debian Jessie (or Ubuntu 13.10+), try
sudo apt-get install lib32stdc++6
instead of the ia32-libs mentioned above.
sudo apt-get install lib32stdc++6
After this you might get following errors
Cannot launch AVD in emulator.
Output:
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 49
Current serial number in output stream: 48
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 49
Current serial number in output stream: 48
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
emulator: WARNING: VM heap size set below hardware specified minimum of 228MB
X Error of failed request: BadValue (integer parameter out of range for operation)
emulator: WARNING: Setting VM heap size to 384MB
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 34
QObject::~QObject: Timers cannot be stopped from another thread
Use these 3 commands to solve those
mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6{,.bak}
mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6.0.18{,.bak}
ln -s /usr/lib/libstdc++.so ~/Android/Sdk/tools/lib64/libstdc++/**
On debian testing, when i tried to run ./tools/mksdcards, i received the error:
error while loading shared libraries: libstdc++.so.6:
cannot open shared object file: No such file or directory
Installing lib32stdc++6 resolves the problem, and was possible to create the avd.
alex@alex-desktop:~$ mksdcard 1024M ./sdcard.iso
bash: /home/alex/android-sdk-linux_x86/tools/mksdcard: No such file or directory
alex@alex-desktop:~$ sudo android create avd -n my_avd -t 1 -c 1024M
I have found this problem & i find a way first:
cd /home/alex/android-sdk-linux_x86/tools/
then write this:
sudo chmod 755 mksdcard
mksdcard 1024M ./sdcard.iso
sudo android create avd -n my_avd -t 1 -c 1024M
it should work :)
MyOS is Oracle Unbreakable Linux 6 - to solve this issue I had to install libstdc++-4.4.6-3.el6.i686 package.