Ionic4 Unoptimized APK

I build the app using:

ionic cordova build android --prod --release

Then I upload the APK to Google Play Console, it says ( warning ):

Unoptimized APK
Warning:

This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices.

Resolution:

Use the Android App Bundle to automatically optimize for device configurations, or manage it yourself with multiple APKs.

How I can get out of this ? can’t continue

sorry, apparently until you complete everything in the site ( store listing / all those gray V in the sidebar ) - you can’t continue… this is just a warning, not a blocker.

Consider this video:

3 Likes

It has became blocking at least at July 2019

We would need a script automation for this issue

Oh wait it’s not actually blocking. It is actually just a warning. I was misleading other Play Store errors.

Oh no, wait again… Well I can’t really understand as it’s a warning (errors are now solved, they was symbolized by a red exclamation mark), but the “start implementation on the channel” button it’s still disabled.

BUT

it’s solvable by CLI

cd platforms/android && ./gradlew bundle

or by android studio manual build.

This youtube video execute the .aab file in ionic 3. Android app bundle in ionic 3.

in case someone is interested in understanding the difference in the line:

cd platforms/android && ./gradlew bundle

I would recomend you checking this link: