Ionic build for release not working,debug apk is working

Hi
I have problem working with release apk, build is working with without --release option.

so i have tried totaly new ionic1 tab app but same issue, please any one look into this if i am doing any thing wrong.

–>ionic start mytabproj tabs --type=ionic1 --cordova
–>ionic cordova platform add android
–>ionic cordova build android
this build is working on device(android 5.1.1)
–>ionic cordova build android --prod --release – -- --minSdkVersion=21
–>keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
–>jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.jks android-release-unsigned.apk my-alias
–>~/Library/Android/sdk/build-tools/26.0.1/zipalign -v 4 android-release-unsigned.apk MyTab.apk
but this apk doesn’t work on device(android 5.1.1)

i also tried with ionic cordova plugin rm cordova-plugin-console & redone whole process

ionic info

global packages:

    @ionic/cli-utils : 1.5.0
    Cordova CLI      : 7.0.1
    Gulp CLI         : CLI version 1.3.0 Local version 3.9.1
    Ionic CLI        : 3.5.0

local packages:

    Cordova Platforms : android 6.2.3
    Ionic Framework   : ionic1 1.3.3

System:

    Node       : v6.11.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b
    ios-deploy : 1.9.1
    ios-sim    : 6.0.0
    npm        : 3.10.10

ionic plugin list

> cordova plugin ls
✔ Running command - done!
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.1 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Hi,

Did you find a solution to your problem?
I’m facing the same issue as well for two days now, can’t find a solution.

White screen of death in release mode, working totally find without release… :frowning:

4 Likes

Hi
My issue was not white screen but it wont be able to install apk in release mode.
but i have uploaded that apk on play store & installed it from play store , it worked. same apk if you try directly it wont work

if you have tried all above steps for release then you should post your ionic info & plugin list & try to raise in this forum.

Did you find the solution for this? I am facing the white screen in release apk too…Debug apk is working fine.

1 Like

Hi all,
Try if it works with ionic run “platform name” -l (live reload).
if yes than try without the -l
if the doesn’t work it generally mean that the files of www aren’t transferred to the platform.
Try move ( for me I use gulp but you can try to do it manually first).
I hope that helps :slight_smile:

I faced the same issue…, building apk using " --prod " flag worked for me
" ionic cordova build android --release --prod "

The scope is to build it and sign it

Build it with:

cordova build --release --prod android

This will minify and disable debugging

Then sign it using Jarsigner

Else, you will see the debug version (app-debug.apk) working and release (app-release-unsigned.apk) not working

Hi,

Even i’m facing same issue. Please let me know if you have solution.

Same issue. Can someone help with the solution.

Still the same… doesnt work the release when i downloaded it from google play

If you facing white screen in release mode. Just add angular.json file image