5

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.

3
  • What have you tried? Do you have those environment variables set and working? Do you have permission/ownership to the folder android-studio/
    – Ron
    Sep 1, 2015 at 4:22
  • I do not know how to set enviroment variables. I tried installing manually.
    – user227495
    Sep 1, 2015 at 9:10
  • The latest version of Android Studio installs JDK 8 along with it by default in the same parent dsirectory as Android Studio.
    – karel
    Jan 11, 2018 at 12:13

3 Answers 3

3

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

1

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
1
  • While this is an alternative solution, this isn't really an answer to the question. I'm facing the same issue as the OP.
    – Nav
    Dec 18, 2015 at 17:44
0

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! ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .