Target API Level 29 Android 10 support in unity

Hello Guys i want to know that how to get target android api level 29 support in Unity. I am using Unity version 2019.3.5f1. As Google updated their policy that ===>

Apps must target API level 29
By August 3, 2020, new apps must target at least Android 10 (API level 29). By November 2, 2020, all apps that are being updated must target at least Android 10 (API level 29).

So as Unity supports api level 28 i have tried many things i have downloaded android studio and download sdk supporting api 29 and api 30 and liked them with unity sdk path but it did not worked so is there any way to fix it ?

I managed to fix that by changing the “Android SDK Location” from sdk manager to “…\Unity\Hub\Editor\2019.2.6f1\Data\PlaybackEngines\AndroidPlayer\SDK” and then under Android SDK Build-Tools in sdk manager removed newer versions and installed 28.0.3 (and 27.0.3, don’t remember which one worked).

I also installed the correct versions from SDK Platforms (API level 29) and in Unity build settings selected the target api level to 29. Upload to google worked too.

1 Like

Hy there i have found fix for my problem and i thought to share it with others…

I am using Unity 2019 version

==> I Upgraded Unity 2019 to unity 2020 version and downloaded the SDK JDK and NDK from Unity Hub with Unity 2020.
==> I have got support of android api 29 but when try to build apk error again comes that you need to upgrade SDK to android 29.
==> Than what i did is i have copied latest SDK folder that installed with Unity 2020 and paste it in my D: drive e,g D:\Unity20\SDK
==> Than I downloaded android studio and opens android sdk manager and here select your SDK path to D:\Unity20\SDK and than from there downloaded latest android 30, android 29 api support from there.

==> after that done open unity 2020 and select SDK path to → D:\Unity20\SDK
==> and now build apk by selecting android api 29
==> no errors will come and you got your apk

==> Hope it works for you guys as well

3 Likes

Hey… So I got this to work by upgrading my android platform tools to api Level 30. Actually, What Google requires is api level 29, but the highest api level available in unity 2019 is api-28. So if you want to upgrade yours,

  1. click on Edit - > Preferences → then copy the path to the android sdk.
  2. Open the path in your file explorer and enter the bin folder.
  3. Make sure that there is sdkmanager.bat in the bin folder.
  4. If available, copy the path to the sdkmanager. (basically, it should be the same with the path you copied from unity. It should just end with ‘/bin’).
  5. Close the file explorer, and open the CMD as an administrator
  6. run cd path_to_the_sdk_manager (Replace with the path to the sdkmanager that you copied)
  7. run sdkmanager “platform-tools” “platforms;android-29”

This should install the latest api level for you. Restart unity and build again :slight_smile:

3 Likes

Someone at Unity please update the Android SDK included in future updates to at least API 29… it’s becoming a requirement on Google Play which will force users to go back to installing Android Studio instead of being able to use the convenient built in Android SDK.
Until they do update it, in case you can’t get the above instructions to work here’s instructions on how to use the latest Android SDK with Android Studio:
Install Android Studio, just google it. It’s free.
Update the Android SDK that Android Studio comes with to API 29 or or API 30 by clicking the SDK manager button at the top right corner of Android Studio, ticking the Android 10 tickbox and clicking apply… (or whatever the latest version is)
With Android 10 SDK installed go into Unity > Preferences > External Tools.
Untick “Android SDK tools installed with Unity” and change the Android SDK directory to: C:/Users/USERNAME/AppData/Local/Android/Sdk)

*Note that I did try the instructions above this post and that method to update the sdk that is included with unity does work, so that is the preferable method… Android Studio is a waste of like 900 MB if you’re only using it for the Android SDK.
One thing I would point out about the above instructions is it’s SDK\tools\bin not SDK\bin

2 Likes

Works like a charm! Many thanks!

1 Like