Sou um desenvolvedor novato de apps, começando com Ionic e sou usuário do Debian.
depois de pronto o app e dentro do diretório do mesmo, abro um terminal e rodo o comando ionic cordova build --release android
, porém recebo o retorno abaixo, ele reclama que o caminho para o sdk, jdk e gradle estão errados, mas estes caminhos levam para os aquivos.
Gostaria de saber o que posso fazer para resolver este problema.
~/ionic/compareProduct$ ionic cordova build --release android Running app-scripts build: --iscordovaserve --externalIpRequired --nobrowser
[22:38:25] build dev started ... [22:38:25] clean started ... [22:38:25] clean finished in 4 ms [22:38:25] copy started ... [22:38:25] transpile started ... [22:38:29] transpile finished in 3.78 s [22:38:29] preprocess started ... [22:38:29] deeplinks started ... [22:38:29] deeplinks finished in 21 ms [22:38:29] preprocess finished in 23 ms [22:38:29] webpack started ... [22:38:29] copy finished in 4.07 s [22:38:42] webpack finished in 12.63 s [22:38:42] sass started ... [22:38:44] sass finished in 1.73 s [22:38:44] postprocess started ... [22:38:44] postprocess finished in 8 ms [22:38:44] lint started ... [22:38:44] build dev finished in 18.24 s
cordova build android --release ✖ Running command - failed!
[ERROR] Cordova encountered an error. You may get more insight by running the Cordova command above directly. [ERROR] An error occurred while running cordova build android --release (exit code 1):
ANDROID_HOME=/home/willer/sdk-tools-linux-3859397 JAVA_HOME=/home/willer/jdk1.8.0_111/bin/java
ERROR: JAVA_HOME is set to an invalid directory: /home/willer/jdk1.8.0_111/bin/java
Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
Error: /usr/share/gradle/bin/gradle: Command failed with exit code 1