How to automatically sign android applications with the Ionic CLI


#1

I want to show you a smart and simple way how you can sign and verify your release .apk with the Ionic CLI and without zipalign and/or apksigner step by step.

Step 1: Add the android platform to your Ionic/Cordova project with ionic platform add android

Step 2: Create your Keystore file (JavaJDK is required) and save it in your resources folder (or create a separate folder):

keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias

If you lose your key, you can’t update your android application anymore in the PlayStore.

Step 3: Create a file named release-signing.properties in the platforms/android folder with the following content

target=android-25
android.library.reference.1=CordovaLib
storePassword=MyPassword
keyPassword=MyPassword
keyAlias=mycompanyname
storeFile=../../resources/android-release-key.jks

But I suggest to keep your password secret and avoid writing them in a clear text file.

Step 4: Run ionic build android --release

If anything works correct the CLI generates now a signed and verified apk named android-release.apk in your platforms/android/build/outputs/apk folder


Deploying apk to device problems - white screen of death and slow upload
Generate ionic apk
#2

What do you think is the best way to do this? It’s bothered me, because every tutorial I’ve read about this process recommends steps with lousy security. But I am not clear whether there is a secure way to do this. Ideally, I’d like to put a file like that in my password manager and never leave it in cleartext anywhere.


#3

If you host your private you can store your password in the file. If not you should remove the lines storePassword and keyPassword. The CLI asks you then to type in the passwords.
On my environment, I stored the passwords in a private variable on my GitLab server. So the Build Server signs the app automatically but no one can see the passwords.


#4

As the /platforms folder is (mostly) kept out of version control (and also sometimes thrown away to fix problems via platform rm, platform add), is there a way to place this somewhere else where it gets copied to this location on Cordova build?


#5

You can implement your own build script which copy’s the .properties file.

My build script for the following.

  1. npm install
  2. ionic platform add ios
  3. ionic platform add android
  4. copy the property file to the platform/android folder
  5. ionic build ios --prod --release
  6. ionic build android --prod --release

Because I’m using GitlabCI and TeamCity I just have to push to my master branch and the build server do the rest for me.


[Solved] Signed apk doesn't install under android >= 7.0, Check your signing process!
#6

OK thanks, still a great improvement.

I was hoping there was something in the cordova build process for that, I remember using hooks back in the Ionic 1 days.


Signing a package or generating a signed package `cordova build release`
Build android --prod --release error with latest cli
#7

Hello @LoLStats thanks for sharing this, I am already following exact same procedure. But I am uncertain if it also performs zipalign.

I tried manually performing zipalign on the generated apk but in Android 7 it throws error -504 when installing from playstore.


#10

That worked like a charm - thank you!


#12

Hi I tried to generate the Keystore file using this command :
keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias

But I got this following error

Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS
12 which is an industry standard format using “keytool -importkeystore -srckeyst
ore my-release-key.keystore -destkeystore my-release-key.keystore -deststoretype
pkcs12”.

please help me to reslove this issue.


#13

I have just spent the last six hours trying to get this to work - without success. I think the problem was the -alias my-alias in the step2.

Finally I got the APK signed by using the follow (it was a lot easier):


#14

I think it also deos zipalign - i tried zipalign on output file. everything was OK.

Srf@SRF-PC C:\Users\Srf\Desktop\Last\platforms\android\app\build\outputs\apk\release
$ C:\Programs\Android_SDK_Minimum\build-tools\27.0.3\zipalign.exe -v 4 app-release.apk ECD.apk
Verifying alignment of ECD.apk (4)...
      49 AndroidManifest.xml (OK - compressed)
     997 META-INF/CERT.RSA (OK - compressed)
    2159 META-INF/CERT.SF (OK - compressed)
   14606 META-INF/MANIFEST.MF (OK - compressed)
   26435 assets/www/SCSS-MOVEME/README_SETUP_INSTRUCTIONS.txt (OK - compressed)
   26770 assets/www/SCSS-MOVEME/ionic.app.scss (OK - compressed)
   27407 assets/www/cordova-js-src/android/nativeapiprovider.js (OK - compressed)
   28169 assets/www/cordova-js-src/android/promptbasednativeapi.js (OK - compressed)
   28978 assets/www/cordova-js-src/exec.js (OK - compressed)
   32732 assets/www/cordova-js-src/platform.js (OK - compressed)
   34589 assets/www/cordova-js-src/plugin/android/app.js (OK - compressed)
   36103 assets/www/cordova.js (OK - compressed)
   53556 assets/www/cordova_plugins.js (OK - compressed)
   53969 assets/www/css/ionic.app.css (OK - compressed)
   92137 assets/www/css/ionic.app.min.css (OK - compressed)
  123212 assets/www/img/0uPKqvyqQfyNPZEGoNTj_FloorWallTerrazzo.JPG (OK)
  132912 assets/www/img/2fTiSpuVR0KDUQCTrmoc_InstallationMaintenance.JPG (OK)
  142984 assets/www/img/4yNpRB7TK2RTs7FII6f9_RealEstate.JPG (OK)
  152876 assets/www/img/532CXjhHTAqUrcIBfcCr_InteriorDesignDecoration.JPG (OK)
  162648 assets/www/img/597odPqOQAqftEDkEAJI_cimen.JPG (OK)
  172524 assets/www/img/5YkpqefESni9notzHEox_Alimu.JPG (OK)
  182196 assets/www/img/74x2wIVTROeOKbyFomJv_GypsumBoard.JPG (OK)
  191332 assets/www/img/7nWpdiTDT8dRSD4zat3v_Insurance.JPG (OK)
  201220 assets/www/img/8i8yhEkPTwyg9YuObgI9_TourTravelDomesticFlights.JPG (OK)
  210944 assets/www/img/8jvWsqjTQdqIom2mI566_WireCable.JPG (OK)
  220436 assets/www/img/8rRrUuyTqmeLhF9ZuhxE_Generator.JPG (OK)
  230784 assets/www/img/9OiYC2b7QCmzjzGAi4pg_WaterWellDrilling.JPG (OK)
  241052 assets/www/img/9Pt8QCu2S4iumru6owLc_FinishingWork.JPG (OK)
  250428 assets/www/img/AGEj8d8FRsWBvlv4eeI6_Tyre.JPG (OK)
  260096 assets/www/img/AGJJoak9Qhi9d1cEiEB9_cer.JPG (OK)
  269860 assets/www/img/AdekuNWTHGGVl6gQPRLe_DS.png (OK)
  316352 assets/www/img/C8EMXamkTvuOZDb6yOCs_SafetyEquipments.JPG (OK)
  326172 assets/www/img/CABELa.JPG (OK)
  358864 assets/www/img/DUgu1RkTguLt6NldvnXw_FurnitureKitchenCabinet.JPG (OK)
  368304 assets/www/img/Dau7PWNlQx2JfJlpw55r_RoofTiles.JPG (OK)
  378404 assets/www/img/EBIqQaw5TeyiELCXOz0i_car.JPG (OK)
  387784 assets/www/img/EUvBBnSoQIK6bbne3zsk_OilPetroleum.JPG (OK)
  397696 assets/www/img/F4AFQTsIT6CkW5mKCSp0_elctrowork.JPG (OK)
  407564 assets/www/img/F9aKAWzkRVgK0krEV9ln_SandAggregate.JPG (OK)
  417136 assets/www/img/FvTxJw2kR7a1yJTWZTbz_MarbleGranite.JPG (OK)
  426692 assets/www/img/GDssNiRRSciPwZ1GYMc8_Awashslide.JPG (OK)
  492132 assets/www/img/HWVy731JTnSZ7sW4d0mA_ethiopiaconstractiondirc.JPG (OK)
  556932 assets/www/img/KxEAI9JbRjiLQFt7tQ7c_REINFORCEMENTbarSteel.JPG (OK)
  566748 assets/www/img/LSrJvevuTUavJZEgTkFl_Stone.JPG (OK)
  576836 assets/www/img/MO5KARHcTWmFPR7FCLOh_Plasticmaterialsproducts.JPG (OK)
  586740 assets/www/img/MjTlkENsTw2W6lbSrn1e_constractionmaterials.JPG (OK)
  596932 assets/www/img/NCynXARLTDCKkbC4OnrJ_Alimu.JPG (OK)
  606616 assets/www/img/NDWRNkdtRF2B9t6eMCG0_ScaffoldingPanel.JPG (OK)
  616748 assets/www/img/UHLshe1USpqkF4eYCol0_WaterPump.JPG (OK)
  626300 assets/www/img/Water Well Drilling2.JPG (OK)
  636360 assets/www/img/Z4rQTZXTIGvZbFlXUfaK_ceramics.JPG (OK)
  645756 assets/www/img/ZbE0yuQtROGhfNfQUi2G_block.JPG (OK)
  655616 assets/www/img/ampRzdJ7REDFWjzIAbm9_Bitumen.JPG (OK)
  665244 assets/www/img/b1rre779QoyNpcrML6xm_car.JPG (OK)
  674632 assets/www/img/bdBh0DWQmqheQx8PHCcf_DirectoryLogo.JPG (OK)
  695800 assets/www/img/cZ2A4FcWSW6TOCqZd6Pf_PvcProfiles.JPG (OK)
  705108 assets/www/img/dHlG0DSTkBsz9Fju3wNj_Glazing.JPG (OK)
  714760 assets/www/img/dI5BFdN4RCG7O7pDafDf_WaterProofingConstructionchemicals.JPG (OK)
  724788 assets/www/img/dtBUKqVNTIyd7QgWgT24_CleaningService.JPG (OK)
  734512 assets/www/img/eZayIlFZRo6XxIOVRRIu_DefaultPage.jpg (OK)
  970180 assets/www/img/eztyzTI1TgaS5qScmNAx_bank.JPG (OK)
  980252 assets/www/img/f5o96YQxRLCFA5dueH06_DefaultPage.jpg (OK)
 1215920 assets/www/img/fHStjVARRKS47UQ15A9d_bank.JPG (OK)
 1225992 assets/www/img/fHhgShWDT4q1MLsN4gW0_constractunmachinary.JPG (OK)
 1235932 assets/www/img/iccWCbTsG6HOmmyURgQM_constractors.JPG (OK)
 1245868 assets/www/img/jL8MPH6iRhCEcp9Ej6Y6_QuartzPaints.JPG (OK)
 1256020 assets/www/img/k2w2jwL4So6zYWHuEmYi_SoilTestEquipments.JPG (OK)
 1266020 assets/www/img/kCtGT6GXTJuQNNHSVVIB_Bitumen.JPG (OK)
 1275656 assets/www/img/kXfqlbThTjyEQuZoPeAT_conselting.JPG (OK)
 1285192 assets/www/img/lTQjo3JZQpikeWzFPCjb_TransportTransit.JPG (OK)
 1295264 assets/www/img/leFmiLloQb2SbGPnICa0_WireCable.JPG (OK)
 1304752 assets/www/img/mOiA0JS8QwCfioY8AaA8_Nails.JPG (OK)
 1314576 assets/www/img/mjERYziXScKfkTW9RX4v_Metalworksproducts.JPG (OK)
 1324956 assets/www/img/ovi5HIG0RziqhDyqKvc6_Spareparts.JPG (OK)
 1335228 assets/www/img/pa1tjx5QRzCzIeg1dI2g_constractiontradingcenter.JPG (OK)
 1345072 assets/www/img/sD66PpHNRCG15O73jruq_LiftElevatorEscalator.JPG (OK)
 1355120 assets/www/img/slide footer/footerslide/S1.PNG (OK)
 1379376 assets/www/img/slide footer/footerslide/S10.PNG (OK)
 1388064 assets/www/img/slide footer/footerslide/S11.PNG (OK)
 1415636 assets/www/img/slide footer/footerslide/S12.PNG (OK)
 1432300 assets/www/img/slide footer/footerslide/S2.PNG (OK)
 1445896 assets/www/img/slide footer/footerslide/S3.PNG (OK)
 1461908 assets/www/img/slide footer/footerslide/S4.PNG (OK)
 1474132 assets/www/img/slide footer/footerslide/S5.PNG (OK)
 1485948 assets/www/img/slide footer/footerslide/S6.PNG (OK)
 1506068 assets/www/img/slide footer/footerslide/S7.PNG (OK)
 1530016 assets/www/img/slide footer/footerslide/S8.PNG (OK)
 1541952 assets/www/img/slide footer/footerslide/S9.PNG (OK)
 1563196 assets/www/img/slide/1.JPG (OK)
 1627960 assets/www/img/slide/2.jpg (OK)
 4275212 assets/www/img/slide/3.jpg (OK)
 6398396 assets/www/img/slide/4.JPG (OK)
 6492212 assets/www/img/slide/5.jpg (OK)
11001028 assets/www/img/slide/6.jpg (OK)
13989316 assets/www/img/slide/7.jpg (OK)
19620076 assets/www/img/tQx10DtQqNkTcDqcTrZQ_DirectoryLogo.JPG (OK)
19650224 assets/www/img/u0Y3cZuxTweg7YGAMRMs_doorlockaccessoriews.JPG (OK)
19660024 assets/www/img/vN1vsallSnCxr46VUEwX_slide2.JPG (OK)
19786872 assets/www/img/vQ8r8DDQ8uIOdDAjiJRg_elctronicsmaterial.JPG (OK)
19796632 assets/www/img/wHDrDjTTSw2bSd2gJQJU_TimberEucalyptus.JPG (OK)
19806832 assets/www/img/xPj1LbUQeKbEk5EKMhDi_FiberGlassTank.JPG (OK)
19816732 assets/www/img/xjZ4m70KTQqb89a7jyEJ_block.JPG (OK)
19826584 assets/www/img/xsARdFK7TVSEMpy7MPrA_cimen.JPG (OK)
19836468 assets/www/img/y7vuh5wFTHynwnTebq3w_DirectoryLogo.JPG (OK)
19857644 assets/www/img/yA289AbT1q5nfDbMXa2Q_PipesFittings.JPG (OK)
19866964 assets/www/img/ysNn3x3aTZnhjr0qMwWC_Partition.JPG (OK)
19876292 assets/www/img/zMeOgPCOSbud7GemPMnk_HotelResort.JPG (OK)
19886200 assets/www/img/zfHO18hLSneJFpL2KHnL_blucapm.JPG (OK)
19898147 assets/www/index.html (OK - compressed)
19899817 assets/www/js/angular-google-maps.min.js (OK - compressed)
19949838 assets/www/js/angular-simple-logger.js (OK - compressed)
19952387 assets/www/js/app.js (OK - compressed)
19953521 assets/www/js/controllers.js (OK - compressed)
19953994 assets/www/js/directives.js (OK - compressed)
19954125 assets/www/js/googlemaps.init.js (OK - compressed)
19954933 assets/www/js/routes.js (OK - compressed)
19955586 assets/www/js/services.js (OK - compressed)
19955739 assets/www/lib/angular-animate/README.md (OK - compressed)
19956864 assets/www/lib/angular-animate/angular-animate.js (OK - compressed)
19994918 assets/www/lib/angular-animate/angular-animate.min.js (OK - compressed)
20004136 assets/www/lib/angular-animate/angular-animate.min.js.map (OK - compressed)
20029369 assets/www/lib/angular-animate/bower.json (OK - compressed)
20029553 assets/www/lib/angular-animate/index.js (OK - compressed)
20029683 assets/www/lib/angular-animate/package.json (OK - compressed)
20030070 assets/www/lib/angular-sanitize/README.md (OK - compressed)
20031202 assets/www/lib/angular-sanitize/angular-sanitize.js (OK - compressed)
20039283 assets/www/lib/angular-sanitize/angular-sanitize.min.js (OK - compressed)
20042352 assets/www/lib/angular-sanitize/angular-sanitize.min.js.map (OK - compressed)
20046327 assets/www/lib/angular-sanitize/bower.json (OK - compressed)
20046513 assets/www/lib/angular-sanitize/index.js (OK - compressed)
20046645 assets/www/lib/angular-sanitize/package.json (OK - compressed)
20047042 assets/www/lib/angular-ui-router/CHANGELOG.md (OK - compressed)
20053798 assets/www/lib/angular-ui-router/CONTRIBUTING.md (OK - compressed)
20055803 assets/www/lib/angular-ui-router/LICENSE (OK - compressed)
20056522 assets/www/lib/angular-ui-router/README.md (OK - compressed)
20059737 assets/www/lib/angular-ui-router/api/angular-ui-router.d.ts (OK - compressed)
20060998 assets/www/lib/angular-ui-router/bower.json (OK - compressed)
20061302 assets/www/lib/angular-ui-router/release/angular-ui-router.js (OK - compressed)
20102295 assets/www/lib/angular-ui-router/release/angular-ui-router.min.js (OK - compressed)
20113088 assets/www/lib/angular-ui-router/src/common.js (OK - compressed)
20115614 assets/www/lib/angular-ui-router/src/resolve.js (OK - compressed)
20118800 assets/www/lib/angular-ui-router/src/state.js (OK - compressed)
20133840 assets/www/lib/angular-ui-router/src/stateDirectives.js (OK - compressed)
20137072 assets/www/lib/angular-ui-router/src/stateFilters.js (OK - compressed)
20137478 assets/www/lib/angular-ui-router/src/templateFactory.js (OK - compressed)
20138640 assets/www/lib/angular-ui-router/src/urlMatcherFactory.js (OK - compressed)
20150027 assets/www/lib/angular-ui-router/src/urlRouter.js (OK - compressed)
20154439 assets/www/lib/angular-ui-router/src/view.js (OK - compressed)
20155289 assets/www/lib/angular-ui-router/src/viewDirective.js (OK - compressed)
20158103 assets/www/lib/angular-ui-router/src/viewScroll.js (OK - compressed)
20158746 assets/www/lib/angular/README.md (OK - compressed)
20159799 assets/www/lib/angular/angular-csp.css (OK - compressed)
20160077 assets/www/lib/angular/angular.js (OK - compressed)
20439048 assets/www/lib/angular/angular.min.js (OK - compressed)
20494164 assets/www/lib/angular/angular.min.js.gzip (OK)
20549209 assets/www/lib/angular/angular.min.js.map (OK - compressed)
20690730 assets/www/lib/angular/bower.json (OK - compressed)
20690891 assets/www/lib/angular/index.js (OK - compressed)
20691001 assets/www/lib/angular/package.json (OK - compressed)
20691376 assets/www/lib/ionic/css/ionic.css (OK - compressed)
20729415 assets/www/lib/ionic/css/ionic.min.css (OK - compressed)
20760443 assets/www/lib/ionic/fonts/ionicons.eot (OK - compressed)
20829045 assets/www/lib/ionic/fonts/ionicons.svg (OK - compressed)
20930601 assets/www/lib/ionic/fonts/ionicons.ttf (OK - compressed)
21040092 assets/www/lib/ionic/fonts/ionicons.woff (OK - compressed)
21107082 assets/www/lib/ionic/js/angular-ui/angular-ui-router.js (OK - compressed)
21148069 assets/www/lib/ionic/js/angular-ui/angular-ui-router.min.js (OK - compressed)
21158866 assets/www/lib/ionic/js/angular/angular-animate.js (OK - compressed)
21196921 assets/www/lib/ionic/js/angular/angular-animate.min.js (OK - compressed)
21206133 assets/www/lib/ionic/js/angular/angular-resource.js (OK - compressed)
21215634 assets/www/lib/ionic/js/angular/angular-resource.min.js (OK - compressed)
21217891 assets/www/lib/ionic/js/angular/angular-sanitize.js (OK - compressed)
21225972 assets/www/lib/ionic/js/angular/angular-sanitize.min.js (OK - compressed)
21229024 assets/www/lib/ionic/js/angular/angular.js (OK - compressed)
21508004 assets/www/lib/ionic/js/angular/angular.min.js (OK - compressed)
21563118 assets/www/lib/ionic/js/ionic-angular.js (OK - compressed)
21671963 assets/www/lib/ionic/js/ionic-angular.min.js (OK - compressed)
21710065 assets/www/lib/ionic/js/ionic.bundle.js (OK - compressed)
22279975 assets/www/lib/ionic/js/ionic.bundle.min.js (OK - compressed)
22437227 assets/www/lib/ionic/js/ionic.js (OK - compressed)
22534765 assets/www/lib/ionic/js/ionic.min.js (OK - compressed)
22578115 assets/www/lib/ionic/scss/_action-sheet.scss (OK - compressed)
22579004 assets/www/lib/ionic/scss/_animations.scss (OK - compressed)
22579427 assets/www/lib/ionic/scss/_backdrop.scss (OK - compressed)
22579694 assets/www/lib/ionic/scss/_badge.scss (OK - compressed)
22580261 assets/www/lib/ionic/scss/_bar.scss (OK - compressed)
22582369 assets/www/lib/ionic/scss/_button-bar.scss (OK - compressed)
22582908 assets/www/lib/ionic/scss/_button.scss (OK - compressed)
22584240 assets/www/lib/ionic/scss/_checkbox.scss (OK - compressed)
22585463 assets/www/lib/ionic/scss/_form.scss (OK - compressed)
22587329 assets/www/lib/ionic/scss/_grid.scss (OK - compressed)
22588350 assets/www/lib/ionic/scss/_items.scss (OK - compressed)
22591904 assets/www/lib/ionic/scss/_list.scss (OK - compressed)
22592616 assets/www/lib/ionic/scss/_loading.scss (OK - compressed)
22593048 assets/www/lib/ionic/scss/_menu.scss (OK - compressed)
22593536 assets/www/lib/ionic/scss/_mixins.scss (OK - compressed)
22596661 assets/www/lib/ionic/scss/_modal.scss (OK - compressed)
22597444 assets/www/lib/ionic/scss/_platform.scss (OK - compressed)
22598121 assets/www/lib/ionic/scss/_popover.scss (OK - compressed)
22599066 assets/www/lib/ionic/scss/_popup.scss (OK - compressed)
22599814 assets/www/lib/ionic/scss/_progress.scss (OK - compressed)
22599962 assets/www/lib/ionic/scss/_radio.scss (OK - compressed)
22600420 assets/www/lib/ionic/scss/_range.scss (OK - compressed)
22601555 assets/www/lib/ionic/scss/_refresher.scss (OK - compressed)
22602333 assets/www/lib/ionic/scss/_reset.scss (OK - compressed)
22604895 assets/www/lib/ionic/scss/_scaffolding.scss (OK - compressed)
22606825 assets/www/lib/ionic/scss/_select.scss (OK - compressed)
22607580 assets/www/lib/ionic/scss/_slide-box.scss (OK - compressed)
22608092 assets/www/lib/ionic/scss/_slides.scss (OK - compressed)
22611119 assets/www/lib/ionic/scss/_spinner.scss (OK - compressed)
22611559 assets/www/lib/ionic/scss/_tabs.scss (OK - compressed)
22614366 assets/www/lib/ionic/scss/_toggle.scss (OK - compressed)
22615828 assets/www/lib/ionic/scss/_transitions.scss (OK - compressed)
22616574 assets/www/lib/ionic/scss/_type.scss (OK - compressed)
22617492 assets/www/lib/ionic/scss/_util.scss (OK - compressed)
22619171 assets/www/lib/ionic/scss/_variables.scss (OK - compressed)
22624129 assets/www/lib/ionic/scss/ionic.scss (OK - compressed)
22624495 assets/www/lib/ionic/scss/ionicons/_ionicons-font.scss (OK - compressed)
22624907 assets/www/lib/ionic/scss/ionicons/_ionicons-icons.scss (OK - compressed)
22633463 assets/www/lib/ionic/scss/ionicons/_ionicons-variables.scss (OK - compressed)
22638640 assets/www/lib/ionic/scss/ionicons/ionicons.scss (OK - compressed)
22639022 assets/www/lib/ionic/version.json (OK - compressed)
22639174 assets/www/lib/ionicuirouter/ionicUIRouter.js (OK - compressed)
22639919 assets/www/plugins/cordova-plugin-device/www/device.js (OK - compressed)
22641291 assets/www/plugins/cordova-plugin-ionic-keyboard/www/android/keyboard.js (OK - compressed)
22641933 assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js (OK - compressed)
22642621 assets/www/templates/aBABEGAZTRADINGPLC.html (OK - compressed)
22643037 assets/www/templates/aBAYBANKSC.html (OK - compressed)
22643360 assets/www/templates/about.html (OK - compressed)
22643959 assets/www/templates/aluminum.html (OK - compressed)
22646010 assets/www/templates/bank.html (OK - compressed)
22646635 assets/www/templates/bitumen.html (OK - compressed)
22647268 assets/www/templates/brickHydraFoamBlock.html (OK - compressed)
22648185 assets/www/templates/cartTabDefaultPage.html (OK - compressed)
22648358 assets/www/templates/categoryINDEX.html (OK - compressed)
22649080 assets/www/templates/cloudTabDefaultPage.html (OK - compressed)
22649251 assets/www/templates/contact.html (OK - compressed)
22649807 assets/www/templates/defaultPage.html (OK - compressed)
22650548 assets/www/templates/ethiopianConstractionDirectories.html (OK - compressed)
22653427 assets/www/templates/tabsController.html (OK - compressed)
22653583 classes.dex (OK - compressed)
22716440 res/drawable-land-hdpi-v4/screen.png (OK)
22848560 res/drawable-land-ldpi-v4/screen.png (OK)
22928948 res/drawable-land-mdpi-v4/screen.png (OK)
23103256 res/drawable-land-xhdpi-v4/screen.png (OK)
23828932 res/drawable-land-xxhdpi-v4/screen.png (OK)
24904692 res/drawable-land-xxxhdpi-v4/screen.png (OK)
25570972 res/drawable-port-hdpi-v4/screen.png (OK)
25714964 res/drawable-port-ldpi-v4/screen.png (OK)
25748308 res/drawable-port-mdpi-v4/screen.png (OK)
25925080 res/drawable-port-xhdpi-v4/screen.png (OK)
26709592 res/drawable-port-xxhdpi-v4/screen.png (OK)
27848224 res/drawable-port-xxxhdpi-v4/screen.png (OK)
29423544 res/mipmap-hdpi-v4/icon.png (OK)
29427536 res/mipmap-ldpi-v4/icon.png (OK)
29428956 res/mipmap-mdpi-v4/icon.png (OK)
29431116 res/mipmap-xhdpi-v4/icon.png (OK)
29437088 res/mipmap-xxhdpi-v4/icon.png (OK)
29447632 res/mipmap-xxxhdpi-v4/icon.png (OK)
29463095 res/xml/config.xml (OK - compressed)
29465100 resources.arsc (OK)
Verification succesful


#15

i think the build command is slightly changed - maybe due to later version.

Srf@SRF-PC C:\Users\Srf\Desktop\Last
$ ionic build android --release
[WARN] ionic build is for building web assets and takes no arguments. See ionic build --help.

       Ignoring argument android. Perhaps you meant ionic cordova build android?


Error in plugin 'sass'
Message:
    scss\ionic.app.scss
Error: File to import not found or unreadable: ../www/lib/ionic/scss.
        on line 7 of scss/ionic.app.scss
>> @import "../www/lib/ionic/scss";

   ^

> ionic cordova prepare --no-build
> cordova prepare
Android Studio project detected

Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Srf\Desktop\Last\hooks\after_prepare\010_add_platform_class.js C:\Users\Srf\Desktop\Last



Srf@SRF-PC C:\Users\Srf\Desktop\Last
$ ionic cordova build --release

? What platform would you like to build (android, ios): android
Error in plugin 'sass'
Message:
    scss\ionic.app.scss
Error: File to import not found or unreadable: ../www/lib/ionic/scss.
        on line 7 of scss/ionic.app.scss
>> @import "../www/lib/ionic/scss";

   ^

> cordova build android --release
Android Studio project detected

Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Srf\Desktop\Last\hooks\after_prepare\010_add_platform_class.js C:\Users\Srf\Desktop\Last

ANDROID_HOME=C:\Programs\Android_SDK_Minimum
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_152
studio
Subproject Path: CordovaLib
Subproject Path: app
Parallel execution with configuration on demand is an incubating feature.
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_e2fioshn4nafvgc38ci6wipo.run(C:\Users\Srf\Desktop\Last\platforms\android\app\build.gradle:143)
Build cache is an incubating feature.
:CordovaLib:preBuild
:app:preBuild
:CordovaLib:preBuild UP-TO-DATE
:app:preBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:CordovaLib:compileReleaseAidl
:app:generateReleaseResValues UP-TO-DATE
:app:createReleaseCompatibleScreenManifests

:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
 UP-TO-DATE
:CordovaLib:checkReleaseManifest UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:platformAttrExtractor
 UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:javaPreCompileRelease UP-TO-DATE
:CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
:app:preReleaseBuild
:CordovaLib:processReleaseJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease UP-TO-DATE
:CordovaLib:packageReleaseRenderscript
:app:preReleaseBuild UP-TO-DATE
:CordovaLib:packageReleaseRenderscript NO-SOURCE
:app:compileReleaseAidl
:CordovaLib:mergeReleaseShaders UP-TO-DATE
:CordovaLib:compileReleaseShaders UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:app:compileReleaseAidl UP-TO-DATE
:CordovaLib:compileReleaseNdk NO-SOURCE
:app:compileReleaseRenderscript UP-TO-DATE
:app:checkReleaseManifest UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources
:CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
:CordovaLib:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForRelease UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:splitsDiscoveryTaskRelease UP-TO-DATE
:app:processReleaseResources
 UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:javaPreCompileRelease UP-TO-DATE
:app:compileReleaseJavaWithJavac
 UP-TO-DATE
:app:compileReleaseNdk NO-SOURCE
:app:compileReleaseSources UP-TO-DATE
:app:lintVitalRelease

:app:mergeReleaseShaders UP-TO-DATE
:app:compileReleaseShaders
 UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets
 UP-TO-DATE
:app:transformClassesWithStackFramesFixerForRelease
 UP-TO-DATE
:app:transformClassesWithDesugarForRelease
 UP-TO-DATE
:app:transformClassesWithPreDexForRelease
 UP-TO-DATE
:app:transformDexWithDexForRelease UP-TO-DATE
:app:mergeReleaseJniLibFolders UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForRelease
 UP-TO-DATE
:app:processReleaseJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForRelease
 UP-TO-DATE
:app:validateSigningRelease

:app:packageRelease

:app:assembleRelease
:app:cdvBuildRelease

BUILD SUCCESSFUL in 8s
46 actionable tasks: 4 executed, 42 up-to-date
Built the following apk(s):
        C:\Users\Srf\Desktop\Last\platforms\android\app\build\outputs\apk\release\app-release.apk
        C:\Users\Srf\Desktop\Last\platforms\android\app\build\outputs\apk\release\app-release-unsigned.apk

Instead of ionic build android --release ,command ionic cordova build --release worked for me.


#16

LoLStats, thanks man you saved my sorry ***, it worked and got my signed app