Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot download system images in Android Studio 3.0 AVD Manager or SDK Manager

When I try to list and download system images in AVD Manager, nothing shows up in the list. See below:
enter image description here None of the three tabs show the images, even after I hit refresh. I have made sure I have a working fast Internet connection. I have checked the SDK Manager also. Nothing related to system images is there for download. My list of SDK update sites is as follows (https://dl.google.com/android/repository/repository2-1.xml and a local repo on my system):
enter image description here

like image 377
djnotes Avatar asked Dec 23 '22 12:12

djnotes


2 Answers

First remove Android settings directory. Make sure Android Studio is closed. On Linux you can run:

sudo rm -rf ~/.android 

Now, launch Android Studio and Download links should be available for system images both in AVD Manager and SDK Manager.
enter image description here

enter image description here

like image 178
djnotes Avatar answered Dec 27 '22 01:12

djnotes


I also had this problem just now in my Manjaro Desktop but unfortunately, the answer by @JasonStack did not work. In my case, the /tmp directory was full so that Android Studio could not download the repository information into the /tmp directory. You can check the /tmp directory status using the following command.

df -h

If this is the problem, it can be fixed by removing all the files in /tmp directory and restarting the computer. To remove all the files in /tmp directory, use the following command:

for i in /tmp/* ; do sudo rm -rf "$i" ; done

Try this command without sudo. If there are any files left, use sudo.


If the file to download is too large, the capacity of the /tmp directory may not be enough. In such scenarios, follow these steps:

Create a new directory in the home directory:

mkdir ~/tmp

Append the following line to the end of <android-studio-location>/bin/studio64.vmoptions file and restart the Android Studio.

-Djava.io.tmpdir=/home/<USER>/tmp

Replace <USER> in the above line with your username.

See this question for more details: /tmp directory in Linux Android SDK

like image 25
Gobinath Avatar answered Dec 27 '22 02:12

Gobinath