"blank" app

Hi to all,
my Ionic app works in debug but not in release!
Any suggests?
What I have forgotten?
Many thanks!

Here my release procedure:

call ionic build --release android
echo password|call “c:\Program Files\Java\jdk1.8.0_65\bin\jarsigner.exe” -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore xxx.keystore platforms\android\build\outputs\apk\android-release-unsigned.apk xxx
call del xxx.apk
call “c:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\zipalign.exe” -v 4 platforms\android\build\outputs\apk\android-release-unsigned.apk xxx.apk

But the release apk It’s not working!
The screen is blank!

Thanks for any help…

No one suggest?!?
I cannot release the app!
A lot of work…
:frowning:
…for a blank screen (but I repeat: built in debug works…)
I’ve created from scratch the project again but I’ve the same problem

Many thanks again for any help.

Have you tried looking at the logs once you have deployed it on your mobile device?

Here my logs:

C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD>call ionic build --release android
Running command: “C:\Program Files\nodejs\node.exe” C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD\hooks\after_prepare\010_add_platform_class.js C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD
add to body class: platform-android
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseRenderscript
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:compileReleaseAidl
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets
:CordovaLib:processReleaseManifest
:CordovaLib:processReleaseResources
:CordovaLib:generateReleaseSources
:CordovaLib:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
:CordovaLib:bundleRelease
:prepareAndroidCordovaLibUnspecifiedReleaseLibrary
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:compileReleaseJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD\platforms\android\src\org\apache\cordova\file\AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:compileReleaseNdk UP-TO-DATE
:compileReleaseSources
:lintVitalRelease
:transformClassesWithDexForRelease
:mergeReleaseJniLibFolders
:transformNative_libsWithMergeJniLibsForRelease
:processReleaseJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForRelease
:packageRelease
:assembleRelease
:cdvBuildRelease

BUILD SUCCESSFUL

Total time: 12.684 secs
Built the following apk(s):
C:/Users/michele.diegoli/Documents/tmp/AppViolazioniCSD/platforms/android/build/outputs/apk/android-release-unsigned.apk

C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD>echo xxxxx | call “c:\Program Files\Java\jdk1.8.0_65\bin\jarsigner.exe” -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore appviolazionicds.keystore platforms\android\build\outputs\apk\android-release-unsigned.apk appviolazionicds
Enter Passphrase for keystore: adding: META-INF/MANIFEST.MF
adding: META-INF/APPVIOLA.SF
adding: META-INF/APPVIOLA.RSA
signing: AndroidManifest.xml
signing: assets/www/cordova-js-src/android/nativeapiprovider.js
signing: assets/www/cordova-js-src/android/promptbasednativeapi.js
signing: assets/www/cordova-js-src/exec.js
signing: assets/www/cordova-js-src/platform.js
signing: assets/www/cordova-js-src/plugin/android/app.js
signing: assets/www/cordova.js
signing: assets/www/cordova_plugins.js
signing: assets/www/css/img/green.png
signing: assets/www/css/img/navigator_back.png
signing: assets/www/css/img/red.png
signing: assets/www/css/img/yellow.png
signing: assets/www/css/style.css
signing: assets/www/css/violazioni.css
signing: assets/www/htmloffline/1_Egaf.html
signing: assets/www/htmloffline/1_Prontuario.html
signing: assets/www/htmloffline/1_Protospataro.html
signing: assets/www/htmloffline/1_Strumenti.html
signing: assets/www/htmloffline/Help0.html
signing: assets/www/htmloffline/Help1.html
signing: assets/www/htmloffline/Help2.html
signing: assets/www/htmloffline/Help3.html
signing: assets/www/htmloffline/Help4.html
signing: assets/www/htmloffline/Help5.html
signing: assets/www/htmloffline/Help6.html
signing: assets/www/htmloffline/Help7.html
signing: assets/www/htmloffline/Help8.html
signing: assets/www/htmloffline/Help9.html
signing: assets/www/htmloffline/Home.html
signing: assets/www/htmloffline/Home.html.orig
signing: assets/www/htmloffline/Login.html
signing: assets/www/htmloffline/css/img/Alfabetica.png
signing: assets/www/htmloffline/css/img/AltreNorme.png
signing: assets/www/htmloffline/css/img/Assistenza.png
signing: assets/www/htmloffline/css/img/CDS.png
signing: assets/www/htmloffline/css/img/Help0.png
signing: assets/www/htmloffline/css/img/Help1.png
signing: assets/www/htmloffline/css/img/Help2.png
signing: assets/www/htmloffline/css/img/Help3.png
signing: assets/www/htmloffline/css/img/Icona_app.png
signing: assets/www/htmloffline/css/img/Iter.png
signing: assets/www/htmloffline/css/img/Logo-Egaf-100.png
signing: assets/www/htmloffline/css/img/Logo-Egaf-200.png
signing: assets/www/htmloffline/css/img/Protospataro.png
signing: assets/www/htmloffline/css/img/Protospataro_200.png
signing: assets/www/htmloffline/css/img/Sommario.png
signing: assets/www/htmloffline/css/img/Strumenti.png
signing: assets/www/htmloffline/css/img/egaf.png
signing: assets/www/htmloffline/css/img/green.png
signing: assets/www/htmloffline/css/img/navigator_back.png
signing: assets/www/htmloffline/css/img/p.png
signing: assets/www/htmloffline/css/img/red.png
signing: assets/www/htmloffline/css/img/ric_acquista.png
signing: assets/www/htmloffline/css/img/ric_egaf.png
signing: assets/www/htmloffline/css/img/ric_help.png
signing: assets/www/htmloffline/css/img/ric_login.png
signing: assets/www/htmloffline/css/img/ric_prontuario.png
signing: assets/www/htmloffline/css/img/ric_protospataro.png
signing: assets/www/htmloffline/css/img/ric_strumenti.png
signing: assets/www/htmloffline/css/img/yellow.png
signing: assets/www/htmloffline/css/style.css
signing: assets/www/htmloffline/js/ender.js
signing: assets/www/htmloffline/js/index.html
signing: assets/www/htmloffline/js/iscroll-lite.js
signing: assets/www/htmloffline/js/iscroll.js
signing: assets/www/htmloffline/js/jquery.min.js
signing: assets/www/htmloffline/js/scrollbar.css
signing: assets/www/htmloffline/noCarabinieriLogin.html
signing: assets/www/htmloffline/offlineHome.html
signing: assets/www/htmloffline/reset.html
signing: assets/www/htmloffline/yellowHome.html
signing: assets/www/img/adam.jpg
signing: assets/www/img/ben.png
signing: assets/www/img/ionic.png
signing: assets/www/img/maltre.png
signing: assets/www/img/max.png
signing: assets/www/img/maz.png
signing: assets/www/img/mcds.png
signing: assets/www/img/mg_altre.png
signing: assets/www/img/mg_az.png
signing: assets/www/img/mg_cds.png
signing: assets/www/img/mg_lex.png
signing: assets/www/img/mg_som.png
signing: assets/www/img/mike.png
signing: assets/www/img/mlex.png
signing: assets/www/img/msom.png
signing: assets/www/img/perry.png
signing: assets/www/index.html
signing: assets/www/js/app.js
signing: assets/www/js/controllers.js
signing: assets/www/js/directives.js
signing: assets/www/js/fsutils.js
signing: assets/www/js/services.js
signing: assets/www/lib/angular-animate/README.md
signing: assets/www/lib/angular-animate/angular-animate.js
signing: assets/www/lib/angular-animate/angular-animate.min.js
signing: assets/www/lib/angular-animate/angular-animate.min.js.map
signing: assets/www/lib/angular-animate/bower.json
signing: assets/www/lib/angular-animate/index.js
signing: assets/www/lib/angular-animate/package.json
signing: assets/www/lib/angular-cookies/README.md
signing: assets/www/lib/angular-cookies/angular-cookies.js
signing: assets/www/lib/angular-cookies/angular-cookies.min.js
signing: assets/www/lib/angular-cookies/angular-cookies.min.js.map
signing: assets/www/lib/angular-cookies/bower.json
signing: assets/www/lib/angular-cookies/index.js
signing: assets/www/lib/angular-cookies/package.json
signing: assets/www/lib/angular-sanitize/README.md
signing: assets/www/lib/angular-sanitize/angular-sanitize.js
signing: assets/www/lib/angular-sanitize/angular-sanitize.min.js
signing: assets/www/lib/angular-sanitize/angular-sanitize.min.js.map
signing: assets/www/lib/angular-sanitize/bower.json
signing: assets/www/lib/angular-sanitize/index.js
signing: assets/www/lib/angular-sanitize/package.json
signing: assets/www/lib/angular-ui-router/CHANGELOG.md
signing: assets/www/lib/angular-ui-router/CONTRIBUTING.md
signing: assets/www/lib/angular-ui-router/LICENSE
signing: assets/www/lib/angular-ui-router/README.md
signing: assets/www/lib/angular-ui-router/api/angular-ui-router.d.ts
signing: assets/www/lib/angular-ui-router/bower.json
signing: assets/www/lib/angular-ui-router/release/angular-ui-router.js
signing: assets/www/lib/angular-ui-router/release/angular-ui-router.min.js
signing: assets/www/lib/angular-ui-router/src/common.js
signing: assets/www/lib/angular-ui-router/src/resolve.js
signing: assets/www/lib/angular-ui-router/src/state.js
signing: assets/www/lib/angular-ui-router/src/stateDirectives.js
signing: assets/www/lib/angular-ui-router/src/stateFilters.js
signing: assets/www/lib/angular-ui-router/src/templateFactory.js
signing: assets/www/lib/angular-ui-router/src/urlMatcherFactory.js
signing: assets/www/lib/angular-ui-router/src/urlRouter.js
signing: assets/www/lib/angular-ui-router/src/view.js
signing: assets/www/lib/angular-ui-router/src/viewDirective.js
signing: assets/www/lib/angular-ui-router/src/viewScroll.js
signing: assets/www/lib/angular/README.md
signing: assets/www/lib/angular/angular-csp.css
signing: assets/www/lib/angular/angular.js
signing: assets/www/lib/angular/angular.min.js
signing: assets/www/lib/angular/angular.min.js.gzip
signing: assets/www/lib/angular/angular.min.js.map
signing: assets/www/lib/angular/bower.json
signing: assets/www/lib/angular/index.js
signing: assets/www/lib/angular/package.json
signing: assets/www/lib/bowser/LICENSE
signing: assets/www/lib/bowser/Makefile
signing: assets/www/lib/bowser/README.md
signing: assets/www/lib/bowser/bowser.js
signing: assets/www/lib/bowser/bowser.min.js
signing: assets/www/lib/bowser/component.json
signing: assets/www/lib/bowser/make/build.js
signing: assets/www/lib/bowser/package.json
signing: assets/www/lib/bowser/src/bowser.js
signing: assets/www/lib/bowser/src/copyright.js
signing: assets/www/lib/bowser/src/useragents.js
signing: assets/www/lib/bowser/test/test.js
signing: assets/www/lib/ionic/css/ionic.css
signing: assets/www/lib/ionic/css/ionic.min.css
signing: assets/www/lib/ionic/fonts/ionicons.eot
signing: assets/www/lib/ionic/fonts/ionicons.svg
signing: assets/www/lib/ionic/fonts/ionicons.ttf
signing: assets/www/lib/ionic/fonts/ionicons.woff
signing: assets/www/lib/ionic/js/angular-ui/angular-ui-router.js
signing: assets/www/lib/ionic/js/angular-ui/angular-ui-router.min.js
signing: assets/www/lib/ionic/js/angular/angular-animate.js
signing: assets/www/lib/ionic/js/angular/angular-animate.min.js
signing: assets/www/lib/ionic/js/angular/angular-resource.js
signing: assets/www/lib/ionic/js/angular/angular-resource.min.js
signing: assets/www/lib/ionic/js/angular/angular-sanitize.js
signing: assets/www/lib/ionic/js/angular/angular-sanitize.min.js
signing: assets/www/lib/ionic/js/angular/angular.js
signing: assets/www/lib/ionic/js/angular/angular.min.js
signing: assets/www/lib/ionic/js/ionic-angular.js
signing: assets/www/lib/ionic/js/ionic-angular.min.js
signing: assets/www/lib/ionic/js/ionic.bundle.js
signing: assets/www/lib/ionic/js/ionic.bundle.min.js
signing: assets/www/lib/ionic/js/ionic.js
signing: assets/www/lib/ionic/js/ionic.min.js
signing: assets/www/lib/ionic/scss/_action-sheet.scss
signing: assets/www/lib/ionic/scss/_animations.scss
signing: assets/www/lib/ionic/scss/_backdrop.scss
signing: assets/www/lib/ionic/scss/_badge.scss
signing: assets/www/lib/ionic/scss/_bar.scss
signing: assets/www/lib/ionic/scss/_button-bar.scss
signing: assets/www/lib/ionic/scss/_button.scss
signing: assets/www/lib/ionic/scss/_checkbox.scss
signing: assets/www/lib/ionic/scss/_form.scss
signing: assets/www/lib/ionic/scss/_grid.scss
signing: assets/www/lib/ionic/scss/_items.scss
signing: assets/www/lib/ionic/scss/_list.scss
signing: assets/www/lib/ionic/scss/_loading.scss
signing: assets/www/lib/ionic/scss/_menu.scss
signing: assets/www/lib/ionic/scss/_mixins.scss
signing: assets/www/lib/ionic/scss/_modal.scss
signing: assets/www/lib/ionic/scss/_platform.scss
signing: assets/www/lib/ionic/scss/_popover.scss
signing: assets/www/lib/ionic/scss/_popup.scss
signing: assets/www/lib/ionic/scss/_progress.scss
signing: assets/www/lib/ionic/scss/_radio.scss
signing: assets/www/lib/ionic/scss/_range.scss
signing: assets/www/lib/ionic/scss/_refresher.scss
signing: assets/www/lib/ionic/scss/_reset.scss
signing: assets/www/lib/ionic/scss/_scaffolding.scss
signing: assets/www/lib/ionic/scss/_select.scss
signing: assets/www/lib/ionic/scss/_slide-box.scss
signing: assets/www/lib/ionic/scss/_slides.scss
signing: assets/www/lib/ionic/scss/_spinner.scss
signing: assets/www/lib/ionic/scss/_tabs.scss
signing: assets/www/lib/ionic/scss/_toggle.scss
signing: assets/www/lib/ionic/scss/_transitions.scss
signing: assets/www/lib/ionic/scss/_type.scss
signing: assets/www/lib/ionic/scss/_util.scss
signing: assets/www/lib/ionic/scss/_variables.scss
signing: assets/www/lib/ionic/scss/ionic.scss
signing: assets/www/lib/ionic/scss/ionicons/_ionicons-font.scss
signing: assets/www/lib/ionic/scss/ionicons/_ionicons-icons.scss
signing: assets/www/lib/ionic/scss/ionicons/_ionicons-variables.scss
signing: assets/www/lib/ionic/scss/ionicons/ionicons.scss
signing: assets/www/lib/ionic/version.json
signing: assets/www/lib/jquery/jquery.min.js
signing: assets/www/lib/ngCordova/CHANGELOG.md
signing: assets/www/lib/ngCordova/LICENSE
signing: assets/www/lib/ngCordova/README.md
signing: assets/www/lib/ngCordova/bower.json
signing: assets/www/lib/ngCordova/dist/ng-cordova-mocks.js
signing: assets/www/lib/ngCordova/dist/ng-cordova-mocks.min.js
signing: assets/www/lib/ngCordova/dist/ng-cordova.js
signing: assets/www/lib/ngCordova/dist/ng-cordova.min.js
signing: assets/www/lib/ngCordova/package.json
signing: assets/www/plugins/com.shazron.cordova.plugin.keychainutil/www/keychain.js
signing: assets/www/plugins/cordova-plugin-device/www/device.js
signing: assets/www/plugins/cordova-plugin-file/www/DirectoryEntry.js
signing: assets/www/plugins/cordova-plugin-file/www/DirectoryReader.js
signing: assets/www/plugins/cordova-plugin-file/www/Entry.js
signing: assets/www/plugins/cordova-plugin-file/www/File.js
signing: assets/www/plugins/cordova-plugin-file/www/FileEntry.js
signing: assets/www/plugins/cordova-plugin-file/www/FileError.js
signing: assets/www/plugins/cordova-plugin-file/www/FileReader.js
signing: assets/www/plugins/cordova-plugin-file/www/FileSystem.js
signing: assets/www/plugins/cordova-plugin-file/www/FileUploadOptions.js
signing: assets/www/plugins/cordova-plugin-file/www/FileUploadResult.js
signing: assets/www/plugins/cordova-plugin-file/www/FileWriter.js
signing: assets/www/plugins/cordova-plugin-file/www/Flags.js
signing: assets/www/plugins/cordova-plugin-file/www/LocalFileSystem.js
signing: assets/www/plugins/cordova-plugin-file/www/Metadata.js
signing: assets/www/plugins/cordova-plugin-file/www/ProgressEvent.js
signing: assets/www/plugins/cordova-plugin-file/www/android/FileSystem.js
signing: assets/www/plugins/cordova-plugin-file/www/browser/isChrome.js
signing: assets/www/plugins/cordova-plugin-file/www/fileSystemPaths.js
signing: assets/www/plugins/cordova-plugin-file/www/fileSystems-roots.js
signing: assets/www/plugins/cordova-plugin-file/www/fileSystems.js
signing: assets/www/plugins/cordova-plugin-file/www/requestFileSystem.js
signing: assets/www/plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js
signing: assets/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js
signing: assets/www/plugins/cordova-plugin-network-information/www/Connection.js
signing: assets/www/plugins/cordova-plugin-network-information/www/network.js
signing: assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js
signing: assets/www/plugins/cordova-plugin-statusbar/www/statusbar.js
signing: assets/www/plugins/cordova-plugin-whitelist/whitelist.js
signing: assets/www/plugins/cordova-plugin-x-toast/test/tests.js
signing: assets/www/plugins/cordova-plugin-x-toast/www/Toast.js
signing: assets/www/plugins/ionic-plugin-keyboard/www/android/keyboard.js
signing: assets/www/plugins/it.egaf.account/www/cryptedaccount.js
signing: assets/www/plugins/it.egaf.removecookies/www/removecookies.js
signing: assets/www/plugins/keychain.js
signing: assets/www/plugins/org.tbyrne.cordova.plugins.screenppi/www/screenppi.js
signing: assets/www/templates/app.html
signing: assets/www/templates/blank.html
signing: assets/www/templates/chat-detail.html
signing: assets/www/templates/login2.html
signing: assets/www/templates/tab-account.html
signing: assets/www/templates/tab-chats.html
signing: assets/www/templates/tab-dash.html
signing: assets/www/templates/tabs.html
signing: res/drawable-hdpi-v4/ic_action_next_item.png
signing: res/drawable-hdpi-v4/ic_action_previous_item.png
signing: res/drawable-hdpi-v4/ic_action_remove.png
signing: res/drawable-hdpi-v4/icon.png
signing: res/drawable-ldpi-v4/icon.png
signing: res/drawable-mdpi-v4/ic_action_next_item.png
signing: res/drawable-mdpi-v4/ic_action_previous_item.png
signing: res/drawable-mdpi-v4/ic_action_remove.png
signing: res/drawable-mdpi-v4/icon.png
signing: res/drawable-port-hdpi-v4/screen.png
signing: res/drawable-port-ldpi-v4/screen.png
signing: res/drawable-port-mdpi-v4/screen.png
signing: res/drawable-xhdpi-v4/ic_action_next_item.png
signing: res/drawable-xhdpi-v4/ic_action_previous_item.png
signing: res/drawable-xhdpi-v4/ic_action_remove.png
signing: res/drawable-xxhdpi-v4/ic_action_next_item.png
signing: res/drawable-xxhdpi-v4/ic_action_previous_item.png
signing: res/drawable-xxhdpi-v4/ic_action_remove.png
signing: res/xml/config.xml
signing: resources.arsc
signing: classes.dex
jar signed.

Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate’s expiration date (2043-06-01) or after any future revocation date.

C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD>call del appviolazionicds.apk

C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD>call “c:\Program Files (x86)\Android\android-sdk\build-tools\23.0.2\zipalign.exe” -v 4 platforms\android\build\outputs\apk\android-release-unsigned.apk appviolazionicds.apk
Verifying alignment of appviolazionicds.apk (4)…
50 META-INF/MANIFEST.MF (OK - compressed)

all logs are OK, I’ve truncated body content due to limit of 32000 characters of this forum

4760201 classes.dex (OK - compressed)
Verification succesful

C:\Users\michele.diegoli\Documents\tmp\AppViolazioniCSD>

…mmm… some warnings on build time…
Regards,
Michele

I understand the problem:
in the code I have some place holder and they are not replaced when I build the app in release, using:

ionic build android --release.

For debug release I follow this procedure (batch file):

call ionic platform rm android
call ionic platform add android
call ionic build android
call gulp replace --env xxx
call gulp test_prod --env xxx
call gulp debug_nodebug --env xxx
call cordova compile android

And it produce android_debug.apk …
What I can do for release?
Thank you,
Michele

Fix problem!
In the release procedure use
cordova compile android --release
instead of
ionic build android --release

It works!

2 Likes