Java version determination error

穿精又带淫゛_ 提交于 2019-12-10 18:23:03

问题


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 !


回答1:


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.




回答2:


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.




回答3:


Another variant:

Replace homePath value in ~/.AndroidStudio1.5/config/options/jdk.table.xml on /usr/lib/jvm/java-8-oracle/bin/java



来源:https://stackoverflow.com/questions/34072267/java-version-determination-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!