Android App Bundle?
-
I have uploaded a new release of my first app to internal test in Google Play.
After I do this, it gives me a warning message:
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.
I don’t see a way to do this in the docs. Is there a way to optimize the APK for Android?
-
Do you use Cordova?
You can find more info here for Cordova:
-
@dobbel Yes, I used Cordova. It was the Cordova apk that resulted in the message I saw in Google Play about needing to be optimized.
-
@omgwalt Some people in the thread above had success with creating a build for a cordova App.
"build-android-apk": "cordova build android --release", "build-android-bundle": "cordova build android --release ; cd ./platforms/android/ ; ./gradlew bundleRelease", "run-android": "cordova run android --release",
-
@dobbel I’m sure that’s true. I can create a build for a Cordova app, too.
That’s not the issue.
The issue is this: is there a way to OPTIMIZE the build such that it no longer includes unused code? Among other things, this should reduce the file size delivered to the end user, which is always a good idea.
-
@omgwalt Yes i know you can build a cordova app.
The discussion in the thread is about how to create a cordova build WITH the “Android App Bundle package” format. Again some people in the thread have successfully created a App with the new format.