I want to reinstall android studio on my apricity linux box and as always I need to write the process for my future reference.
Android Studio 2
I use yaourt :
yaourt -S android-studio
note : same command also work for upgrade Android Studio to newer version
Java in Apricity
By default android studio will install openjdk 7 so I ended with 3 version of Java after install Oracle JDK :
yaourt -S jdk
default default-runtime java-7-openjdk java-8-jdk java-8-openjdk
Make Oracle JDK for Android Studio as it always give me warning :
OpenJDK shows intermittent performance and UI issues. We recommend using the Oracle JRE/JDK.”
Set environment :
sudo nano /etc/environment
and this line :
save. For more detail explanation of switching you can refer to this.
Java Compiler aka javac
I just realized that javac command return an error :
zsh: command not found: javac
ls -al /usr/bin | grep javac
lrwxrwxrwx 1 root root 30 Nov 2 2014 javac -> /usr/lib/jvm/default/bin/javac
quick resolv :
sudo rm /usr/bin/javac
sudo ln -s /usr/lib/jvm/java-8-jdk/bin/javac /usr/bin/javac
Testing javac version
Fix Java Version error message
For this error message :
Error:Buildtools 24.0.1 requires Java 1.8 or above. Current JDK version is 1.7.
Open File -> Project Structure -> Locate for JDK 8 and hit OK button
Tuning Android Studio Memory Usage
I have 8 GB memory but still need to optimize performance of Android Studio
Click Help -> Edit Custom VM options, click Yes.
I change my minimum and maximum memory into these numbers :