No System image available when adding AVD in Android studio

Its to easy to do:

  1. Go to SDK Manager opening sdk manager
  2. Check the Show Package Details Checkbox
  3. Check the System Image checkboxes based on your CPU architecture (x86 or x64) and your needs ( Google play) checking the checkboxes

4.Click on apply and Let it be downloaded

Done!

It worked for me hope will work for yours.


Start the SDK manager (Tools -> Android -> SDK Manager) and install some images.
Checking the "Show Package Details" checkbox allows for finer selections of what you need.


Probably your /tmp is full.

Close your Android Studio.

Check if exists some directory like /tmp/PackageOperation01/ and remove it.

You should find a partition in your system with more space than your /tmp, let say your /var has more.

So create a new directory like /var/tmp-android and edit the file ./android-studio/bin/studio.sh replace this line

VM_OPTIONS=""

with

VM_OPTIONS="-Djava.io.tmpdir=/var/tmp-android

Give the answer on this site for the first time, so perhaps I can`t express clearly.

Once I happened this issue, and I run the sdkmanager application in android-sdk-path

cd ~/Library/Android/sdk/tools/bin/sdkmanager;

and I got this output.

Warning: java.net.UnknownHostException: dl.google.com
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-3.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-2.xml
Warning: Failed to connect to host: https://dl.google.com/android/repository/addons_list-1.xml
Warning: Failed to download any source lists!

the reason I got this is that my network can't connect the dl-google website. So I search the valid IP address, and I got this '203.208.41.36'.enter image description here. I changed the hosts file and save it.

203.208.41.36 dl.google.com

Then I run the avd manager again, and it worked. enter image description here