Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question How to update Target API Level to 30 Android

Discussion in 'Editor & General Support' started by Only4gamers, Aug 4, 2020.

  1. Only4gamers

    Only4gamers

    Joined:
    Nov 8, 2019
    Posts:
    333
    Hello everyone,
    When i submitted my game to Google Play it shows that my game must support at least Android API 29. While my Unity version only support Up to Android API 28. So, I updated my Unity Editor to the latest LTS version and also updated NDK, SDK etc from Unity Hub. But problem not solved. So, I downloaded latest SDK from Android Studio and changed my SDK path to C:\Users\Hi\AppData\Local\Android\Sdk in External Tools
    But it still not showing 29 and 30.

    Other than that I am getting these warnings in Console:
    1)
    Observed package id 'tools' in inconsistent location 'C:\Users\Hi\AppData\Local\Android\Sdk\tempToolsDir' (Expected 'C:\Users\Hi\AppData\Local\Android\Sdk\tools')
    System.Reflection.MethodBase:Invoke(Object, Object[])

    2)
    File C:\Users\Hi\.android\repositories.cfg could not be loaded.
    System.Threading.ThreadHelper:ThreadStart()

    and in External Tools my NDK is also showing warning that "you are missing the recommended Android NDK..." while I downloaded everything from Unity Hub.
    Please help.
     
    Last edited: Aug 4, 2020
  2. tzaf

    tzaf

    Joined:
    Aug 14, 2020
    Posts:
    1
    hi i'm having the same problem wold like to get some advice
     
  3. Only4gamers

    Only4gamers

    Joined:
    Nov 8, 2019
    Posts:
    333
    Which errors you are seeing?
     
  4. Adem1907

    Adem1907

    Joined:
    Jan 23, 2020
    Posts:
    1
    I have the same problem. Did you find anything to solve this problem?
     
  5. Only4gamers

    Only4gamers

    Joined:
    Nov 8, 2019
    Posts:
    333
    Which error are you seeing?
     
  6. Ellukitas_123

    Ellukitas_123

    Joined:
    Jan 20, 2021
    Posts:
    21
    We need help
     
  7. MiguelAppStudio

    MiguelAppStudio

    Joined:
    Nov 17, 2020
    Posts:
    19
    Hola.


    No estoy seguro de si el problema es el mismo, pero creo que sí. Me pasó lo mismo y lo solucioné desde Unity @Ellukitas_123

    PlayerSettings >>. Otras configuraciones >> Configuración Nivel de API de destino Debe cambiar el Nivel de API de destino.

    Te muestro una captura de pantalla.

    Espero que sea la solucion correcta

    Suerte

     
    Last edited: Jan 31, 2021
  8. MiguelAppStudio

    MiguelAppStudio

    Joined:
    Nov 17, 2020
    Posts:
    19
     

    Attached Files:

  9. MiguelAppStudio

    MiguelAppStudio

    Joined:
    Nov 17, 2020
    Posts:
    19
    I'm not sure if the problem is the same, but I think it is. The same thing happened to me and I solved it from Unity

    PlayerSettings >>. Other Settings >> Configuration Target API Level You must change Target API Level.
     

    Attached Files:

  10. Ellukitas_123

    Ellukitas_123

    Joined:
    Jan 20, 2021
    Posts:
    21
    Muchas gracias
     
    MiguelAppStudio likes this.
  11. Wombat_Rancher

    Wombat_Rancher

    Joined:
    Jul 25, 2021
    Posts:
    6
    My god. Still works like a charm. Gracias mi amigo
     
    Last edited: Feb 4, 2022
    Cactillium and MiguelAppStudio like this.
  12. alirazabrame

    alirazabrame

    Joined:
    Dec 25, 2019
    Posts:
    2
    I have solved in a different way with these steps:
    • Add support of android in unity. This will make a SDK in the unity editor.
    • Install Android Studio with new SDK. Install android platforms which you want to use in the unity. Also install android build tools of the highest API level.
    • In the new SDK, the platforms which you have installed from android studio copy these platform folders and put these folders in unity android SDK. Also copy the build tools folder from new SDK and paste it in the unity android SDK.
    That's all. Hope this will work!

    upload_2021-8-16_1-18-36.png

    upload_2021-8-16_1-15-28.png
    upload_2021-8-16_1-14-48.png
    upload_2021-8-16_1-13-40.png
    upload_2021-8-16_1-11-52.png
     
  13. FlurinJenal

    FlurinJenal

    Joined:
    Nov 18, 2018
    Posts:
    18
    Also had a problem with updating Android SDK to version 30 in Unity. In my case I had to enter the computer admin PW 3 times, before Unity looped back into the message "update Android SDK...". No error messages, it was just not able to update. Solution: I went to "preferences", copied the location of the SDK tools (keep default location by Unity) and opened the location in the file explorer of my compter. From there I opened the folder "SDK" and then "platforms". It had me to enter my admin PW, which I did. After that, somehow Unity was able to access the folder when I wanted to build the project and update the SDK using Unity's link. Hope it helps.
     
    Hunter-PrimeUnity likes this.
  14. Vivraan

    Vivraan

    Joined:
    Feb 2, 2018
    Posts:
    26
    In my case, I just used the path to my default SDK location which is managed by Android Studio. I guess I can't open Unity in Administrator mode.

    How did you manage to get Unity to do that? Where did you get the enter password prompt?
     
  15. ffrootloop

    ffrootloop

    Joined:
    Jul 26, 2020
    Posts:
    1
    IT WORKED!! Thank you
     
  16. infoexpert

    infoexpert

    Joined:
    Jun 11, 2017
    Posts:
    3
    Here's another way to do it.
    1. Install java https://javadl.oracle.com/webapps/download/AutoDL?BundleId=245479_4d5417147a92418ea8b615e228bb6935
    2. Set JAVA_HOME variable https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html
    3. Open Windows PowerShell as admin.
    4. In PowerShell enter your unity editor "SDK\tools\bin" directory.
    cd "C:\Program Files\Unity\Hub\Editor\2020.3.19f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin"

    5. Run "sdkmanager.bat" with "platforms" parameter.
    .\sdkmanager.bat "platforms;android-30"


    That's it!
     
  17. profsteven7

    profsteven7

    Joined:
    Jun 14, 2016
    Posts:
    6
    That worked perfectly for me!! Thanks for saving me from this frustrating episode! I've been stuck on this for longer than I care to admit.

    (PS I only did steps 3-5, and it still worked. I guess my Java was already set up correctly)
     
    hellokidlo and Rem777 like this.
  18. dimit1r4o

    dimit1r4o

    Joined:
    Mar 30, 2021
    Posts:
    1
    Thank you so much, this worked great!