Android Studio on Manjaro

Long time no see! I am hopefully done with the exams for a year and will hopefully write some backdated posts. I completed the book on Java (kind of) and configured a new Linux setup with i3 and Manjaro.

Downloaded Android Studio from AUR and expected it to run nicely. But as everything on Linux, it looked at me and said –

Jesus laughing

It slapped me with an error saying the SDK directory’s empty. After googling (or rather duckduckgoing) the error for a few minutes and looking for the SDK everywhere on the disk, I realized it was supposed to be downloaded on the startup but obviously it didn’t.

Thinking that I just had to download the SDK, I looked it up on AUR and found the android SDK – 69 different versions of it. Also, some guy on SO said that the SDK on AUR breaks updates. So I started looking for other solutions.

I, of course tried the downloading the SDK through the SDK Manager but nothing on it loaded, or was clickable. Then went through the other settings, turned on the auto-detect proxy thingy for some reason and boom! Stuff started loading on the SDK Manager. Yet noting was clickable and the SDK location still didn’t show anything so I click on the edit button, hoping that it would let me download the SDK. Any location other than the default ~/Android/Sdk/ seemed to let me download the SDK, so I downloaded the SDK of about 900 megs to ~/Android/sdk/ and went on to start a new project. The same error again! The the directory name to ~/Android/Sdk/ from ~/Android/sdk. Tried to start a project again. Same fucking error! Closed it, looked up the error again. Finding nothing, restarted Android Studio. A prompt asked me to download some android platform of about 100 megs. Downloaded it and the error was gone! Booyeah!

tl;dr – Google apparently stopped packaging the Android Studio IDE with the SDK tools some time ago and the SDK is downloaded on first run now. For some reason Android Studio needed the auto-detect proxy setting to be turned on to connect to the download servers, even though I am not connected through any proxy. Android Studio thinks that the SDK is downloaded at ~/Android/Sdk even after the failed download attempt at first run. So download it in a different location and then optionally transfer the files to this location. The SDK Manager for some reason doesn’t download the android platform during this download process. So close Android Studio and start it again. It should download the other required stuff now and you should be rolling. If not, rm -rf –no-preserve-root /.

P.S. People who aren’t drowning in RAM, do not try to build massive shit like Android Studio on /tmp.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s