Ionic cordova build does nothing after lint finished running

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


[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

    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/

    backend : pro

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.

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

I got the same problem recently. Its worth mention that this problem isn’t obvious the same for everyone. Which cause by different/older version of npm or ionic or even android and java.

In my case, it was simple as closing down some earlier terminal window (using iTerm2) and restart it again.
And everything work perfectly. Which indicate there’s a bug somewhere in iTerm2.

But I still using older versions. And it works perfectly building.

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

local packages:

@ionic/app-scripts : 3.2.1
Ionic Framework    : ionic-angular 3.9.2


Node : v9.3.0
npm  : 5.5.1
OS   : macOS High Sierra


backend : pro

java version “1.8.0_162”
Java™ SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot™ 64-Bit Server VM (build 25.162-b12, mixed mode)