Ionic cordova build does nothing after lint finished running


#1

Whenever I run ionic cordova build android --verbose, it stops after linting. Building for iOS works fine without any hiccups though. I also tried uninstalling Android Studio and reinstalled it, updating to all packages (ionic, cordova, npm) to the latest version but to no avail.

Any points would be much appreciated. Thanks.

ionic cordova build android --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: '/private/var/www/myapp', local: true, binPath: '/usr/local/lib/node_modules/ionic/bin/ionic',
        libPath: '/private/var/www/myapp/node_modules/ionic/dist/index.js' }
[DEBUG] Daemon found (pid: 1930)
Running app-scripts build: --platform android --target cordova
[14:38:50]  build dev started ...
[14:38:50]  clean started ...
[14:38:50]  clean finished in 19 ms
[14:38:50]  copy started ...
[14:38:51]  deeplinks started ...
[14:38:51]  deeplinks finished in 604 ms
[14:38:51]  transpile started ...
[14:39:00]  transpile finished in 9.06 s
[14:39:00]  preprocess started ...
[14:39:00]  preprocess finished in 6 ms
[14:39:00]  webpack started ...
[14:39:01]  copy finished in 10.26 s
[14:39:17]  webpack finished in 16.63 s
[14:39:17]  sass started ...
[14:39:20]  sass finished in 2.83 s
[14:39:20]  postprocess started ...
[14:39:20]  postprocess finished in 23 ms
[14:39:20]  lint started ...
[14:39:20]  build dev finished in 29.48 s
> cordova build android
Android Studio project detected

ANDROID_HOME=/Users/jc/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk9.0.4.jdk/Contents/Home

[14:39:27]  lint finished in 7.50 s

ionic info yields this as below:

cli packages: (/private/var/www/myapp/node_modules)
    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:
    cordova (Cordova CLI) : 8.0.0

local packages:
    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : android 7.0.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:
    Node  : v6.5.0
    npm   : 5.6.0
    OS    : macOS High Sierra
    Xcode : Xcode 9.0.1 Build version 9A1004

Environment Variables:
    ANDROID_HOME : /Users/jc/Library/Android/sdk/

Misc:
    backend : pro

#2

After hours of hair pulling, I practically uninstalled every thing and reinstall them. The culprit seems to be Java. After installing a fresh Java JDK, everything just works out now.


#3

I already was able to solve that by reinstalling npm. Old version was 5.8.0, new is 5.10.0, which now works.