Unity 5.4 uses old android SDK target (api level: 22), so i cant update my app on play store


I have an application on play store that i built with a previous version of unity, that used aPI level 23 (marshmallow) as a target sdk version. Now i want to release a newer version of it with unity 5.4, but i cannot upload the SDK because unity is now back to using target sdk version 22 (Lollipop), and the play store wont let me update

Unity does not have a setting to control the target sdk version (there is a setting for the minimum supported api, but that’s not the same). So what do i have to do to publish my app on the play store?

The play store displays this error message:
“It is forbidden to downgrade devices which previously used M permissions (target SDK 23 and above) to APKs which use old style permissions (target SDK 22 and below). This occurs in the change from version 2 (target SDK 23) to version 3 (target SDK 22).”

Unity uses whatever Android SDK you have in your system.

So, make sure that you have the latest android API installed, by starting the Android SDK Manager, and updating to the latest API.

Also, make sure that in Unity/Edit/Preferences/ External Tools the path to the Android SDK is set correctly to the Android SDK installation you updated.

Hi @Hussar123
What is the SDK Target that you need?
Have you checked that you have the target API installed in your Android SDK location?
Unity supports the target API that you need as soon you have it installed in your machine

copy SDK tools_r25.2.5-windows >>>>AppData\Local\Android\sdk ools


@trenmost I don’t know if you fixed this or not but I’ve just ran into this problem, when trying to add my APK to my Google Play Console account, and spent nearly 4 hours getting it to work. I have Unity 2017.3.1f1 and didn’t need to update it. I did follow some of the instructions in:

Specifically I updated the following:
Android SDK Tools
Android SDK Platform-Tools
Android SDK Build-Tools

Note afterwards that Unity was still saying that my highest level was Level 25:

I did a rebuild and checked the AndroidManifest using AndroidStudio’s Build->Analyze APK and it shows:


I was able to drag and drop the APK into my Google Play Console without any problems.

Restarting Unity didn’t show the newly available SDK levels. I’ve not restarted my PC but I think they’ll probably appear after that.

Anyway, hope this helps someone because it’s a minefield.

Upgrading andriod sdk worked for me…

you can solve this problem by watch me own video on YouTube ,I putted the link in github hopefully that maybe help someone :slight_smile: