Ionic --prod Android


#1

Im trying to create a deploy apk using the following command: “ionic cordova build android --prod”, but it takes too long, and on the final doesnt creat any apk for Android.

The output:

Running app-scripts build: --prod --platform android --target cordova
[15:03:05] build prod started …
[15:03:06] clean started …
[15:03:06] clean finished in 134 ms
[15:03:06] copy started …
[15:03:08] deeplinks started …
[15:03:08] deeplinks finished in 389 ms
[15:03:08] ngc started …
[15:04:18] ngc finished in 69.57 s
[15:04:18] preprocess started …
[15:04:18] preprocess finished in less than 1 ms
[15:04:18] webpack started …
[15:04:22] copy finished in 75.84 s
[15:48:26] webpack finished in 2648.78 s
[15:48:26] uglify started …
[15:48:26] sass started …
[15:48:31] sass finished in 5.18 s
[15:48:31] cleancss started …
[15:48:34] cleancss finished in 2.97 s
[15:49:09] uglify finished in 42.78 s
[15:49:09] postprocess started …
[15:49:09] postprocess finished in 40 ms
[15:49:09] lint started …
[15:49:09] build prod finished in 2763.98 s

The ionic info is:

@ionic/cli-plugin-proxy : 1.5.6
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.1.2
Cordova Platforms  : android 6.2.3 ios 4.5.3
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.0.2
Node              : v8.9.1
npm               : 5.3.0
OS                : Windows 8.1

Any idea of what can be?


#2

The correct command would be ionic cordova build android --prod --release - --prod only produces and optimized build, --release is for release versions of apps.

This is very strange.

How big is your app?
How fast your computer?
Do you have your app on a local hard drive?


#3

How big is your app? When is compille, is about 23 MB, the all files is about 347 MB.
How fast your computer? Intel Core i5-3230M 2.60GHZ with 8,00 GB RAM
Do you have your app on a local hard drive? Yes, I do.


#4

How many pages/screens are this? Are these pages very, lots of html?

Can you try on another computer?