Ionic cordova build android --prod --release unsuccess without any error code

Hi, i can not build release apk file for my project. When i run ionic cordova build android --prod --release, it run properly but it suddenly stop without any error code. No release apk file was built and i do not have any idea what’s happen.
Here is the terminal log:

D:\Cong viec\B-GATE\XoSoAppWorkspace\NewXoSoApp\LotteryApp>ionic cordova build android --prod --release
[INFO] Running app-scripts build: --prod --platform android --target cordova

[11:42:37]  build prod started ...
[11:42:37]  clean started ...
[11:42:37]  clean finished in 519 ms
[11:42:37]  copy started ...
[11:42:37]  ngc started ...
[11:43:18]  ngc finished in 41.05 s
[11:43:18]  preprocess started ...
[11:43:18]  deeplinks started ...
[11:43:25]  deeplinks finished in 6.46 s
[11:43:25]  optimization started ...
[11:43:33]  copy finished in 55.98 s
[11:44:06]  optimization finished in 40.69 s
[11:44:06]  preprocess finished in 47.15 s
[11:44:06]  webpack started ...
[11:46:06]  webpack finished in 120.51 s
[11:46:06]  sass started ...
[11:46:06]  uglifyjs started ...
[11:46:09]  sass finished in 3.36 s
[11:46:09]  cleancss started ...
[11:46:15]  cleancss finished in 5.78 s
[11:46:57]  uglifyjs finished in 51.26 s
[11:46:57]  postprocess started ...

D:\Cong viec\B-GATE\XoSoAppWorkspace\NewXoSoApp\LotteryApp>

Here is my ionic info

cli packages: (C:\Users\XD-PRO\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 6.5.0

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.0.0 browser 4.1.0
    Ionic Framework    : ionic-angular 3.6.0

System:

    Android SDK Tools : 25.2.2
    Node              : v6.9.1
    npm               : 3.10.8
    OS                : Windows 7

Please some body help me. Many thanks.

2 Likes

same problem here :frowning:

Run with --verbose -- -d and post the output.

This is old. Update to Cordova 7.0.1 and remove and re-add your android platform.

@Cinnz Post your ionic info output.

1 Like

Hi @Sujan12, thanks for your reply. I removed and added cordova CLI and Cordova Platform. And now, it works perfectly. I can build android --release.

1 Like