Ionic app building problem

Asked

Viewed 148 times

1

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

once the app is ready and inside the app directory, I open a terminal and run the command ionic cordova build --release android, however I get the return below, he complains that the way to the sdk, jdk and Gradle are wrong, but these paths lead to the aquives.

I wonder what I can do to solve 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 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

1 answer

0


  • yes vc is right, abei to realize this thanks! but the cool is inside a script file that is loaded with the system.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.