API version detected by the Google Play Store

I have used MIT AppInventor to create my application (a very simple one), so I have got my ".APK" file.

In order to publish my application the Google Play Store, I have been obliged to:
-import my ".APK" file on my smartphone
-convert it in ".AAB" file using a "APK to AAB converter" utility on my smartphone (Samsung S8 under Android 9)
-export my "AAB" file back to my PC
-sign my "AAB" file with a personal Android Studio key.

The signature is successful, but the Google Play console refuses to upload my application because "the required level of API (>=31) is not reached by my application (v29)".

Based on my reading of the Google articles, I see no other solution that to perform the APK to AAB conversion on modern smartphone using a recent version of Android: because I believe (not sure) that the API version detected by the Google Play Console is defined by the Android version of the smartphone.

In case I am wrong, do you know if the version of the API detected by the Play Console (on the .AAB file) has something to do with MIT App Inventor ???

Thank you,

Why didn't you just generate an AAB file in AppInventor?

Because at the time I did not know that Play Console does not accept anymore the ".APK" format and requires a ".AAB" format ... and after i have forgotten that APPInvenotr is able to generate a ".AAB" through the Build Menu...
So I immediately try to generate a ".aab" from MITAppInventor, and try to sign it with Android Studio, in order to see if Play Console accepts it.

Do you know what is the API version generated by MIT AppInventor ?

I have signed (with Android Studio) the ".aab" directly generated by MITAppInventor, and it is a bit better: the API version detected by Play Console after the upload attempt is v30 (instead of v29 previously) but not yet the v31 that is required.
Do you know how to get the proper API version ?? I do not see such a choice in MIT interface..
I don't know how to proceed !
Thank you

What software did you use to sign the APK/AAB?

The current version of App Inventor directly targets SDK 31. There shouldn't be any issues.

Your APK file was probably compiled some time ago, before the AppInventor update. Why don't you open your project in AppInventor and recompile it creating an AAB file?

See this info in Tutorials re signing of AAB files:

What software did you use to sign the APK/AAB?

The current version of App Inventor directly targets SDK 31. There shouldn't be any issues.
I initially converted the MIT APK on my smartphone (Samsung S8) using a "APK to ABB converter" utility, when I have been told that MIT AppInv is able to generate an ".AAB", so I just directly downloaded the ".AAB" from MIT.

What software did you use to sign the APK/AAB?

I initially used a 2020 version of Android Studio, both the generate the key, let's name it "key1" (the ".jks" file) and to generate the signed ".AAB" bundle.

It fails, the error message indicated a wrong API version.
Then I selected an upper version of the SDK within Android Studio, it downloaded and installed the required additional modules, but after a new signed bundle Play console reported still the same API error (v30 whereas v31 is required).

Then I uninstalled Android Studio and installed the latest version of Android Studio (2022.2.1). I selected the latest API-33 within Android Studio: Tools->SDK Manager->Android SDK.
Android Studio 2022.2.1 downloaded and installed the required components, but the signed AAB Bundle still generates the same error regarding the level of API when I have tried to upload it from the Play Console (!).

After a long search, I found that it exists a relationship between the detected API version and the version of an Android plugin named "Gradle". This plugin was in version 3.1 in the latest Android Studio version, whereas its current version is 8.x (!)...

So I have upgraded this plugin to its latest 8.x version from Android Studio, since it failed to upgrade to version 4.x... It is a long process, but it finally upgraded it to version 8.x.

Then I resigned the ".AAB" bundle with Android studio, and the Play Console does not report any API error, BUT Play console still refuses the upload saying un unclear message regarding a "footprint" and "certificate", and as usual, does not suggests a solution.
I have tried to generate another signature key (let's name it "key2") with the latest upgraded Android Studio version, but the signed ".AAB" bundle is refused both when signed with key1 or with key2....

You can find a screen capture of the error here:

The Google Play Console Support is not efficient at all: the French Support is not competent at all, and I cannot post in English because my web language (defined in the Play console) is French and seems impossible to change (!): when I try to change it, a long of languages appear, except English...

I have already spent 4 weeks trying to upload this app to the Play Store (!), compared to 1 day for developing the app on the excellent MIT App Inventor platform.

So I have stopped asking the Google Play Console French support anything: they are totally not competent. And it should be obvious to contact the English support but changing the language within Play Console looks like another marathon.

Consequently I stop trying to use the Google Play Store until I found somebody knowing well the Play Console and able to guide me step by step through this signature process.

Play Console is the worst nightmare and crappy platform that I have seen to date !

Meantime, i just send my application (.APK) via email to the users, and the users will install it by themselves: not satisfactory, but if I continue to waste my time with Play Console, I fear to go to the hospital instead of going on vacation...