Problems publishing an app in the play store

I’m trying to publish a video game on the play store. I get the following error:

"Your app currently targets API level 32, but should target at least level 34. It will then rely on the latest APIs, which are optimized for security and performance. "

My configuration:
ETC2 fallback 32-bit. Half resolution.
Minimum API level: 22
Target API level: automatic
Target architectures: ARMv7 ARMv64

Let me know if I’m missing anything else or I’m overlooking something. Thank you

I think it would be better to set the target API level to 34 or 35 directly and then upload it.

It didn’t work, it’s still the same. But something strange is that changing the configuration in unity is not maintained. In addition to play console when uploading the .aab file
It appears: SDK target 32

Sounds like you’re doing something wrong.

In the Editor, open Player settings->Other and pick needed Target API (Guess 34 in your case). Increase version numbers, rebuild .aab and try again. Also, if no other changes were done - there is a chance that gradle cache might not update, so doing a clean build would safeguards you from such case.

t didn’t work. I left it at Target API level: 35 and it still doesn’t detect it. Also something that appears when creating the .aab is in the image. (I give the second option. The first one gives me an error)

I highly recommend removing ALL the Android SDKs and NDKs and toolchains.

Then install precisely one, ideally the one that comes with whatever version of Unity you are using.

If that version isn’t high enough you will need to install one that is, then tell Unity to use it.

Here was how I brought up Unity2020.3.41 and the Android SDK 31 on October 30, 2022 (edited on August 23, 2023 to include Android SDK 33…) (and again for SDK34):

Android SDK35 stuff:

And here’s a bunch of related stuff you may find helpful:

How to troubleshoot build failures:

Obviously, if there is actionable data, clues or information within any of the errors, fix those problems. Each error entry may have more information than can fit in the console log so select each error and read the expanded view below it.

If that gives you nothing worthwhile (look to Google! You’re never the first one!), then…

First, make a blank project with a single blank scene and prove that it builds successfully.

If the blank project does NOT build, go fix your Unity installation or your other tools, such as Android SDK, NDK, JDK, etc. It may even be necessary to change to a different version of Unity3D. It is generally best to stay with LTS versions of Unity3D.

Until you can build a blank project to the target platform, don’t fiddle with anything else.

Once you can build a blank project, now bisect the problem by bringing over parts of your current project and building it one subsystem at a time, perhaps stubbing things out that might trigger compiler errors.

Most often things that prevent building are misconfigured or incorrectly-installed or incompatible third-party libraries such as Firebase or AdMob or IronSource.

Once you identify the subsystem, go to the documentation for it and make sure you are doing it correctly.

It may also be helpful to work through a tutorial or two for whatever subsystem is making the build fail.

Android build not building:

Circa July 2022 here have been reports of Unity’s installer failing to install the Android Tools.

Android Gradle errors and other related stuff:

What Unity version do you use?
API 41 doesn’t exist yet :slight_smile:
Quite some time ago there was a bug with SDK manager incorrectly parsing API levels, try updating Unity version to the latest build of the same stream

I use 2022.3.6. And that’s also the strange thing, it asks for an API that doesn’t even exist XD

So, it would be good to install a new version. Because I did the uninstallation, I even removed the entire editor. Then I reinstalled everything and it’s still the same.

Yep, that’s a thing. It’s one of the flakiest toolchains I have ever touched.

Keep after it. Keep trying combinations. Different versions of Unity, different versions of SDK… it will work eventually. Make sure your OS isn’t tripping you up with antivirus stuff too.

Good luck.

That’s quite old version, there is a chance that SDK manager bug is still there. Try using latest 2022.3, should help

I’m going to try with: 2023.2.20f1

Updating the version solved the problem, both in unity and in the playstore

1 Like