Reputation: 141
Today I got following warning from Google Play "Your app currently targets API level 30 and must target at least API level 31 to ensure it is built on the latest APIs optimized for security and performance."
How can and where I should specify target API level? To be honest I didn't specify anything. I just recently moved from Unity 2018 to Unity 2020 and got following warning.
How can it be fixed? Thank you in advance
Upvotes: 9
Views: 24290
Reputation: 317
if you have android studio or unchecked the ticks that Unity handles the android SDKs automatically you need to check these two folder
C:\Users\username\AppData\Local\Android\Sdk\build-tools
C:\Users\username\AppData\Local\Android\Sdk\platforms
unity has issue with sdk API 31+ (32 and so on...) unity will download build-tools based on target sdk on player settings, if you set to automatic, it will download highest version (33 right now), which is problematic, set target sdk to 31 or set the Target API Level to automatic, unity will search build-tools folder automatically for highest version which you need to remove any 31+ if unity has downloaded before. if you have android studio targeting 33 for android build u must cut it to desktop and put it back for ur android build.
Upvotes: 0
Reputation: 111
First of all, always ensure you are using the latest stable build of unity. Older versions may not have the new API levels required for the latest android versions.
Then go to: Edit -> Project Settings -> Player -> Other Settings
If you have selected Android as the Build Platform: Under the Identification, there will be a Minimum API Level and Target API Level.
Set the Target API Level to automatic, which will be the highest installed. If you won't have an API Level such as 31, it means you need to upgrade your unity version or install the API level manually.
Upvotes: 6