I can't install apk

If i use this code

ionic cordova run android --device
its output ‘android-debug.apk’ and i can use and installed this apk

but if i use this code

ionic cordova build android --prod --release

i can’t install this output apk.

what is the reason for that?

You need to sign it first!

Hi, seems like the problem is with the --release flag.
According to this answer in StackOverflow, you simply remove the --release flag and you can install the (debug) apk produced.

As mentioned above, signing it would also work. But if you wanted to save the time to sign it and simply run the app, run:

cordova build android