Ionic app building problem

1

I'm a novice app developer, starting with Ionic and a Debian user.

After the app is ready and inside the directory of it, I open a terminal and squeeze the command ionic cordova build --release android , however I get the return below, it complains that the path to sdk, jdk and gradle are wrong, but these paths lead to the files.

I would like to know what I can do to resolve this problem.

  

~ / 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   [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 can 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

    
asked by anonymous 19.07.2017 / 03:52

1 answer

0

Certainly the problem is in the definition of the JAVA_HOME environment variable Installation of Ionic in Windows (Explain about JAVA_HOME)

If you use Linux, just use

export JAVA_HOME={YOUR_PATH}
    
19.07.2017 / 13:57