Can't release APK in Play Store: Unoptimized APK

I’m trying to release my app in the Play Store, but it says (a warning) my APK is unoptimized and, due to this, does not let me release it at all.

Warning: https://prnt.sc/q11p9j

How can I work it out?

Hi @nickolascarios.

First, that’s a Warning and not an Error. It will not block you from submitting your app. To get this warning to go away, you need to submit a .aab file, not a .apk file. You need to be running the latest daily build, to get a .aab file. It’s also required because Google requires 64-bit support, and Android SDK 28 support, both which were added as part of our massive Android update, which you get with the latest daily build.

If you want the warning to go away, build with the latest daily build and submit the .aab file that’s submitted. You will also have to move to Google based App signing as well to use .aab files.

Rob

So if we want to upload .aab file we have to use google based app signing , but what if I want to sign with my key own store ?
When Corona SDK generated APK will become optimised for Google Play Console ?

Please help there , I have many new apps to create in google Play asap.
Thank you.
Bhavin :slight_smile:

If you want to use .aab files, you will have to use Google based app signing. A Corona APK can never ben “optimized”. .aab files are the optimized files.

Rob

Hi Rob,

Thanks for your reply.
I have found how to upload .aab file to Google Play store.
Here are few steps I have followed and get success: (may be help someone)

  1. I have created my own Keystore (mykeystore.keystore)

  2. build for Android with that “mykeystore.keystore”
    –  Now need to generate private key for “mykeystore.keystore” using Android studio
    ( reference : https://developer.android.com/studio/publish/app-signing#generate-key )

  3. open Android studio --> open Any native project in Android studio -->  Build > Generate Signed Bundle/APK.
    4. In the  Generate Signed Bundle or APK  dialog, select  Android App Bundle  and click Next
    5.  Below the field for  Key store path , click  Choose Existing
    .

  4. Fill All details & must Check Export Encrypted Key…

  5. Click Next & then Finish 

  6. Now you will have a file “private_key.pepk”

  7. Go to Google Console --> select you App --> on left side panel “App Signing”

  8. Select second option out of 3 --> in step that option step 2 has upload button
    11 select you private_key.pepk file and go ahead

  9. Now you can upload .aab file to your App Realeases section

Thank you.
Bhavin :slight_smile:

Dear Bhavin,

I have the same problem: I generated the .apk app with the key. But Google Play console (web) refuses to accept it claiming that it is not optimized.

It’s a warning, it’s true, but I couldn’t get around it: it’s a mistake disguised as a warning.

Correctly the .aab file - which incidentally has identical dimensions to the .apk file - asks me for the digital signature.

At this point for the generation of the key, Google Play console gives me three possibilities:

1- upload a key from Android Studio

2- use java keystore

3- use something that doesn’t use java keystore

(and obviously manage himself all the mess of the keys)

I have not loaded Android Studio. Do I have to load and use it to generate the key?

Is there another method that uses 1,2,3 ?

Is there an updated guide? i think this guide https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

we can throw it to the nettles!

in my opinion it is much more difficult to publish the game than to program it!

then, once this is solved, we will have to face the expensive apple world where I see that the coronalabs documentation for the release of the app is even more sparse …

thanks!

Renato

The Google Play console accepts unoptimized binaries. It’s a warning not an error. You need to use a later daily build which supports .aab files. Instead of uploading a .apk, upload the .aab file that Corona produces and Google Play will stop complaining about “Unoptimized binaries”. All .apk’s are “Unoptimized binaries”.

The build process for Android required Java JDK 1.8. Newer versions of the JDK are not promised to work.

Rob

Dear Rob,

thank you for support.

I have last corona build 2020.3579

I have Java JDK 1.8.

Still I don’t understand what I have to do for have a private/public key that Goggle Play Console accept.

Thankyou

Renato

I don’t have a good way to get you the step by step, but if I remember, For your app on Google Play, click on Release Management, then App signing. From there, follow the instructions. I think I did the middle option to export and upload a key from a Java Keystore.

Rob

Dear Rob,

I found out where the problem is !

actually it’s just a warning to have loaded the .apk file and the platform lets you publish the app as long as all the actions of the left column flagged in gray have become flagged with green!

Otherwise it does not tell you that you have to complete the other required actions, it simply does not let you proceed with the publication.

Thanks

Renato

Dear Renato,

Sorry for late reply, very tough time in lock-down.

Did you get success in uploading build with App Signing enabled ?
If not,
Show me which 3 options you can see in App signing, I can guide you step by step.

Bhavin :slight_smile:

Thank you Bhavin,

I solved: what is in the documentation is correct.

The problem is that the platform don’t lets you publish the app as long as all the actions of the left column flagged in gray have become flagged with green!

Renato

Dear Bhavin,

I have the same problem: I generated the .apk app with the key. But Google Play console (web) refuses to accept it claiming that it is not optimized.

It’s a warning, it’s true, but I couldn’t get around it: it’s a mistake disguised as a warning.

Correctly the .aab file - which incidentally has identical dimensions to the .apk file - asks me for the digital signature.

At this point for the generation of the key, Google Play console gives me three possibilities:

1- upload a key from Android Studio

2- use java keystore

3- use something that doesn’t use java keystore

(and obviously manage himself all the mess of the keys)

I have not loaded Android Studio. Do I have to load and use it to generate the key?

Is there another method that uses 1,2,3 ?

Is there an updated guide? i think this guide https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

we can throw it to the nettles!

in my opinion it is much more difficult to publish the game than to program it!

then, once this is solved, we will have to face the expensive apple world where I see that the coronalabs documentation for the release of the app is even more sparse …

thanks!

Renato

The Google Play console accepts unoptimized binaries. It’s a warning not an error. You need to use a later daily build which supports .aab files. Instead of uploading a .apk, upload the .aab file that Corona produces and Google Play will stop complaining about “Unoptimized binaries”. All .apk’s are “Unoptimized binaries”.

The build process for Android required Java JDK 1.8. Newer versions of the JDK are not promised to work.

Rob

Dear Rob,

thank you for support.

I have last corona build 2020.3579

I have Java JDK 1.8.

Still I don’t understand what I have to do for have a private/public key that Goggle Play Console accept.

Thankyou

Renato

I don’t have a good way to get you the step by step, but if I remember, For your app on Google Play, click on Release Management, then App signing. From there, follow the instructions. I think I did the middle option to export and upload a key from a Java Keystore.

Rob

Dear Rob,

I found out where the problem is !

actually it’s just a warning to have loaded the .apk file and the platform lets you publish the app as long as all the actions of the left column flagged in gray have become flagged with green!

Otherwise it does not tell you that you have to complete the other required actions, it simply does not let you proceed with the publication.

Thanks

Renato

Dear Renato,

Sorry for late reply, very tough time in lock-down.

Did you get success in uploading build with App Signing enabled ?
If not,
Show me which 3 options you can see in App signing, I can guide you step by step.

Bhavin :slight_smile:

Thank you Bhavin,

I solved: what is in the documentation is correct.

The problem is that the platform don’t lets you publish the app as long as all the actions of the left column flagged in gray have become flagged with green!

Renato

Thanks Rob! It helped me in publishing the app on Playstore!