Error while installing Android Studio, no JDK found

by user227495   Last Updated January 12, 2018 22:02 PM

Tried other guides, no luck. Please assist

Got the following error

No JDK found. Please validate either STUDIO_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.



Answers 3


You seem to try to install it manually? The easiest way would be to use a repository as described here: http://www.webupd8.org/2014/05/install-android-studio-in-ubuntu-via-ppa.html

sudo add-apt-repository ppa:paolorotolo/android-studio
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer oracle-java8-set-default android-studio
Jakob Lenfers
Jakob Lenfers
September 01, 2015 04:39 AM

Before you execute studio.sh, you need to run the following from terminal (regardless whether using 32-bit or 64-bit OS).

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

Hope it helps. Cheers! ;)

Shatadip
Shatadip
January 11, 2018 12:02 PM

To solve this error I had to do the following:

Install the Default JDK

sudo apt-get update
sudo apt-get install default-jdk

Set the JAVA_HOME Environment Variable

Get the JDK path here:

sudo update-alternatives --config java

Edit the environments file

sudo nano /etc/environment

And add the JAVA_HOME path to the end of the file:

JAVA_HOME="/usr/lib/jvm/java-8-oracle"

Then reload the environment with

source /etc/environment

After that I was able to start the Android Studio setup without the error.

Source: How To Install Java with Apt-Get on Ubuntu 16.04

Suragch
Suragch
January 12, 2018 21:53 PM

Related Questions


avd manager missing from android-studio(3.0.1 linux)

Updated November 27, 2017 07:02 AM




Android studio only starts with sudo

Updated April 20, 2015 10:00 AM