Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java version determination error

I just install Android Studio 1.5 on Ubuntu 14.04. I created a new project and I get the following error:

Error:Could not determine Java version using executable /usr/lib/jvm/java-1.5.0-gcj/bin/java.

My /usr/lib/jvm/ contain:

java-1.5.0-gcj            java-7-oracle  java-gcj
java-1.5.0-gcj-4.8-amd64  java-8-oracle  java-gcj-4.8

The Project Structure has the JDK location set up to /usr/lib/jvm/java-1.5.0-gcj. Should it me something else ? How can I know ?

Many thanks for you help !

like image 795
Rafnuss Avatar asked May 01 '26 09:05

Rafnuss


2 Answers

I solved my problem by simply changing the JDK to /usr/lib/jvm/java-8-oracle. I still don't know why it works, or why it should have been like this at the first place. Sorry for the question.

like image 52
Rafnuss Avatar answered May 03 '26 23:05

Rafnuss


The problem occurred because location of the JDK directory was not defined correctly. In Android studio File ->Project structure ->in left side tabs click on SDK location->define the directory where JDK is located . For example:/usr/lib/jvm/java-8-oracle/jdk1.8.0_77 is my directory of JDK.The location can be different.

like image 45
Kirtika Jhalani Avatar answered May 03 '26 22:05

Kirtika Jhalani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!