I hope we can reduce the app size through it , I tried in different ways i cannot get idea for that. Please help me out. Is there any Posibilities to do that.
Edit: See Matti’s answer below if you’re on Cordova >= 8.1.0
You need to have
"cordova-android": 8.0.0 or later.
ionic cordova build android --prod --releaseas usual
change into the
/platforms/androidfolder and run
./gradlew bundleRelease. On Windows, the file might be called
This outputs the bundle at
/platforms/android/app/build/outputs/bundle/release/app.aab. Sign this bundle just like you would sign the APK and upload it to the Play Store.
Is supported natively in cordova-android >= 8.1.0
ionic cordova build android --prod --release -- -- --packageType=bundle
Note the extra
-- -- dashes before
-- is required by cordova. Second one is required because there is another cli tool between (ionic).
If you use cordova without ionic:
cordova build android --prod --release -- --packageType=bundle