Fedora 27: Install Android Studio 3.0

This article will describe installing Android Studio 3.0.

1 Install Android Studio

Install package for Android Studio.

$ sudo dnf install -y qemu-kvm android-tools libstdc++.i686 zlib.i686

Install Android Studio to /opt.

$ URL=https://dl.google.com/dl/android/studio/ide-zips/
$ wget -q ${URL}/android-studio-ide-171.4408382-linux.zip
$ sudo unzip -q android-studio-ide-171.4408382-linux.zip -d /opt/
$ rm -f android-studio-ide-171.4408382-linux.zip

Create desktop file for Android Studio.

$ cat <<EOF | sudo tee /usr/local/share/applications/android-studio.desktop
[Desktop Entry]
Name=Android Studio
Exec=env _JAVA_OPTIONS=-Djava.io.tmpdir=/var/tmp /opt/android-studio/bin/studio.sh

1.1 Download error with System Image

Android Studio uses tmpfs for download and extract System Image. This uses about 3G Byte memory and causes the following error.

To install:
- Google APIs Intel x86 Atom_64 System Image (system-images;android-25;google_apis;x86_64)
Preparing "Install Google APIs Intel x86 Atom_64 System Image (revision: 8)".
Downloading https://dl.google.com/android/repository/sys-img/google_apis/x86_64-25_r08.zip
An error occurred while preparing SDK package Google APIs Intel x86
Atom_64 System Image: Cannot download
No space left on device

, response: 200 OK.
"Install Google APIs Intel x86 Atom_64 System Image (revision: 8)" failed.
Failed packages:
- Google APIs Intel x86 Atom_64 System Image (system-images;android-25;google_apis;x86_64)

For avoid this error, use the following Java option and make Android Studio to use /var/tmp which is not tmpfs.


2 Run Android Studio

Run android-studio.desktop at the launcher or run the following command at the terminal.

$ _JAVA_OPTIONS=-Djava.io.tmpdir=/var/tmp /opt/android-studio/bin/studio.sh