Problem creating Android Studio project on Ubuntu


I installed Android Studio, but when I go to create a project or open an existing one, the following message appears:

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


Follow these steps:

  • open terminal in Ubuntu : sudo apt-get install oracle-java7-installer
  • open android studio: FILE> Outras Configurações> Estrutura do Projeto Padrão . In the JDK Localização section put the url of the Oracle Java7 installation, it is usually usr/lib/jvm/java-7-oracle/

To develop Android apps for Android 5.0 and above you need JAVA SDK7 like I told you to install here. JAVA 8 is recommended, but I can only say that Java7 takes me 1.5GB of RAM, and JAVA8 takes 2GB.

Scroll to Top