I have compiled my app as an apk, but Google Play rejected the format saying that I need to optimize it. Now I know I have to upload an aab file. How can I convert my apk file into an aab one?

Warning message


Solution 1:

The warning if you don't upload an AAB is not blocking the release. If you can't publish, there must be another reason: go back to your store listing or distribution options to make sure you have filled out everything.

I know this doesn't answer directly your question, but uploading an AAB will not help you since you'll be stuck at the same place (you won't have the warning anymore but you still won't be able to publish).

Solution 2:

You can convert apk to aab without source from apk but its long process

  1. 1.decompile apk with apktool

  2. copy res folder and AndroidManifest.xml to another folder

  3. use aapt2 compile command to compile each resources one by one and it will convert every .png .xml file to .flat file

4.Use aapt2 link to make apk that contain resources in protobuf format

5.Extract resources.pb from apk and AndroidManifest.xml and res folder

6.Make base.zip and use build-bundle command to create aab

or upload your apk here apktoaabconverter.com they will convert apk for you