Target API level 31

Hi, 4 days ago I uploaded an app to Google Play with no problems :slight_smile:

Today I got this error when uploading the .aab file to Google Play:
"Your app currently targets API level 30 and must target at least API level 31 to ensure that it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 31"

Is it possible to change the API-level in my code?
Br Teddy

1 Like

A new app? If so, this should not have been possible (after Aug 1, 2022).
A new app must target SDK 31 since Aug 1, 2022.

1 Like

See also here:

1 Like

I approach Teddy's request. Until a few hours ago he made me upload, for a new app, aab file with api target 30, then a little while ago I created a new app and he didn't upload the aab file, requesting the target api 31. We that we use Appinventor for the creation of the App how can we solve? We can only wait and it is up to the Appinventor team to make these changes / updates to adapt to the changes in the play store, or is there another solution?

1 Like

I doubt that if it was actually a new app.

I assure you, I have created and uploaded several new apps in the last few days and it has made me upload and send them all up to now, 2 pm (Italian time), when the notice written in red 'The current target API level of your app is 30, but the minimum target API level must be 31 to ensure that the app is based on the latest APIs optimized for security and good performance. Change your app's target API level to at least 31. '
If you have a simple solution to change the target API of apps created with app inventor I would be grateful.

1 Like

The simple solution is nb190 scheduled to be released sometime this month for SDK 31 (Android 12)

2 Likes

It may be that there was a delay with the error message. This doesn't change the fact that from Aug 1st 2022 no new apps can be released with targeSdkVersion=30.

Not really a "simple" solution: :wink:

  1. Build the APK.
  2. Decompile it.
  3. Edit the Manifest and add
    android:exported="true"
    to each <activity ... > and <receiver ... >.
  4. Set targetSdkVersion = 31.
  5. Recompile it.
  6. Check if the app (APK) can be installed on your test devices.
  7. If so, convert the APK to AAB:
    https://community.niotron.com/t/convert-apk-to-aab-file/9684
    (otherwise check if you missed to add android:exported="true" to every <activity> and <receiver> and continue with step 4).
10 Likes

Hi and thanks for all your answers :slight_smile: love this forum :slight_smile:

5/8-2022 I did release this app to Google Play: https://play.google.com/store/apps/details?id=appinventor.ai_teddybrask.NASA_pictures as a new app.
I will try @Anke' solution later this day to see if I can get it to work.

3 Likes

Please Help Me Can You Send Me Some Screen Short How You Did This?

buenas noches saben si app inventor actualizara la configuración para que las apps nuevas salgan con la forma del api31? saludos

Manifest (example):

2 Likes

good evening, do you know if app inventor will update the configuration so that new apps come out with the api31 form? Cheers

The AI2 team is working on the targetSdk 31 update and I think it will be available soon.

You currently only have two options:

  1. Waiting for the targetSdk 31 update or
  2. follow my instructions.

Hi, @Anke thanks for your support.
The Manuel way is quite time-consuming (for me :sweat_smile:) and is pointing out how strong a product app inventor really is! HOPE the team has plenty of strong coffee and that the next update is available soon :slight_smile:

Hi, I have over 90 educational apps published and this morning (August 10th) I encountered the same problem. Google play now requires API Level 31. We've been through this before, especially when they stopped accepting APK and started requiring AAB. There are options to try to generate the AAB File on the KODULAR Platform. Just import your AIA file on that platform, but I believe they are also using API Level 30 there. I suggest waiting for the update of the great platform, APP INVENTOR.

I hope I was helpfull.

Please how can sign aab file with my keystore????

Thank you