Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Question Unity 2020.3.41f1 Required API level 31

Discussion in 'Android' started by nina32176, May 31, 2023.

  1. nina32176

    nina32176

    Joined:
    Jun 27, 2018
    Posts:
    17
    Hello, is it possible to get API level 31 detected via Unity 2020.3.41f1?
    I have used Unity since 5.5.0 times and never had so serious compiling problem for Android, this is crazy.
    Unity was installed via hub.
    I updated SDK with Android Studio.
    Here's the error message:
    upload_2023-5-31_11-1-27.png
    upload_2023-5-31_11-1-55.png
    Here are prefs:
    upload_2023-5-31_11-2-11.png
    Here is downloaded SDK:
    upload_2023-5-31_11-2-49.png
    I lalso tried adding remaining packages:
    upload_2023-5-31_12-29-38.png
    And build tools 31 - they are for SDK 31? But still no luck.

    So , my question is, how to build with that new unity? For google Play... thank you! I am out of ideas now.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,678
    In the first screenshot, in the dialog, did you click Update Android SDK? Unity would then install API 31, you don't need to go to Android Studio.
     
  3. nina32176

    nina32176

    Joined:
    Jun 27, 2018
    Posts:
    17
    Thank you for your suggestion @Tomas1856 . I have tried this solution several times, since 2017 times if I remember correctly, it always opens a PowerShell for me that closes after few seconds. It never worked for me.

    I am on Windows 10, of course I have admin rights, so I don't really know what's going on with that.

    I saw that this "Update Android SDK" supposedly does some kind of simple command that was posted somewhere on the forums, but I am not sure where, currently.

    I am going to try installing 2020.3.48 next and check again, but so far, I tested latest LTS 2017 (I was using it), then 2018 LTS, then 2019 LTS, and now 2020.3.41f1 and I still haven't managed to get anything building for Android 31.
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,678
    The command is displayed in that powershell window, and if succesful - it creates a folder in C:\Program Files\Unity3D\****\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-31.

    Maybe you can create a video capture and show how it looks for you?