Issue
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
Solution
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.
Answered By - Ben
Answer Checked By - Mary Flores (JavaFixing Volunteer)