Command - Cordova run android

0

I'm having trouble executing the command "$ cordova run android", see the line below after executing the command;

$cordova run android
ANDROID_HOME=/home/dev3/Android/Sdk/
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
Error: Requirements check failed for JDK 1.8 or greater

The environment variable is set correctly in / etc / environment.

$java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-3~14.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

What could have happened?

The colleague's questioning led me to check if my environment variable was set correctly, when checking was correct but however the command

$javac -version --> estava apontando curiosamente para o jdk7;

That led me to check and set through the update-alternatives command my $ javac compiler

$sudo update-alternatives --config javac
Existem 2 escolhas para a alternativa javac (disponibiliza /usr/bin/javac).

  Selecção   Caminho                                      Prioridade Estado
------------------------------------------------------------
  0            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1071      modo automático
  1            /usr/lib/jvm/java-7-openjdk-amd64/bin/javac   1071      modo manual
* 2            /usr/lib/jvm/java-8-openjdk-amd64/bin/javac   1069      modo manual
    
asked by anonymous 24.02.2017 / 18:40

0 answers