How to build for Android's Google Play release?

I’m currently stuck with trying to make a successful build for Google Play. I signed my app and made a release build (actually I’ve tried many different builds for different architectures) and I keep on getting a warning when trying to upload my APK to Google Play console:

Unoptimized APK

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.


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

Now I have no idea how to make an optimized APK or a bundle now. I could find the gradlew and the build.gradle files in the /bin/ folder, tried running it, got a success message, and still - don’t have an optimized APK anywhere to be found.

Can anyone tell me what I’m missing? I’ve tried looking for docs in OpenFL related searches and found nothing to help me with this problem.

I don’t have any experience with openFL on android yet but recently released an android app made with AIR and I had to provide 2 separate APKs : one for 32 bits and one with a higher version number for 64 bits.

Maybe your APK contains both 32 and 64 bits versions ?

I’m not sure if this is the issue you’re having, but I had to add the following to Project.xml in the Path Settings section, in order to build for both of the necessary architectures:

<architecture name="arm64" exclude="armv5" />

This should build both 32 bit and 64 bit versions in one APK. It’s not ideal for file size, but I also don’t know how to make an App Bundle, and at least Google Play accepts it.

I’ve tried the suggested solutions. It’s true that Google Play store wants either an android asset bundle or multiple APKs for different device types. I have tried compiling with parameters for a single architecture, but it didn’t seem to help… I need to look more into building android apps. Hopefully there’s a way to make an asset bundle from the APK that contains multiple architecture support somehow.

I’m going to continue looking into it, since it’s a must to publish on Google Play, but if anyone has any info, please share :slight_smile:

Here’s something helpful:

I can’t think of when we’d do this as part of our builds but it looks like this might be all we are missing

I will take a look at it and if it’s successful I’ll make some kind of a guide for others. It was waaay too hard to get a simple app compiled ready for Google Play.

I personally believe it’s an important requirement for devs to seriously consider OpenFL - have a clear and sure way to deliver their apps to the desired target platforms.

OK, I have something to confess; I feel really silly, but the problem wasn’t on the OpenFL/lime side.

You can publish an aligned, signed app to Google Play just fine. The thing that was preventing me from publishing the APK was the missing info about the app:

  • Age rating
  • App content
  • Price
  • etc.

If those parts aren’t filled (indicated by the grayed out check-marks in a circle on the left-side panel), you won’t be able to publish anything, even if it’s an Android App Bundle.

Sorry for the confusion and I hope it helps anyone else, who might have similar problems.