If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin.
If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.
Check if your Java JDK is installed correctly
dpkg --list | grep -i jdk
If not, install JDK
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java8-installer
After the installation you have to enable the jdk
update-alternatives --display java
Check if Ubuntu uses Java JDK 8
java -version
If all went right the answer should be something like this:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
Check what compiler is used
javac -version
It should show something like this
javac 1.8.0_91
Finally, add JAVA_HOME to the environment variable
Edit /etc/environment
and add JAVA_HOME=/usr/lib/jvm/java-8-oracle
to the end of the file
sudo nano /etc/environment
Append to the end of the file
JAVA_HOME=/usr/lib/jvm/java-8-oracle
You will then have to reboot, you can do this from the terminal with:
sudo reboot
In case you want to remove the JDK
sudo apt-get remove oracle-java8-installer
sudo apt-get install default-jdk
That's all in ubuntu 11
This is caused by having JAVA JRE installed as opposed to JAVA JDK.
The solution is simple:
sudo apt-get install openjdk-7-jdk
http://www.maxmakedesign.co.uk/development/2013/android-studio-tools-jar-classpath/
The error is self explanatory, you need to set your environment variable to JDK path instead of JRE here is it
JDK_HOME: C:\Program Files\Java\jdk1.7.0_07
check the path for linux
and here is possible duplicate Android Studio not working
Widows 7 64 bit.
in OpenSuSE 13.1 and some 13.2 versions you also need to:
java-1_7_0-openjdk-devel
packageFor x86:
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0/ sh studio.sh
For x64:
JAVA_HOME=/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/ sh studio.sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With