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. Dismiss Notice

Missing or misplaced android sdk platform in Unity 2019.4.12f LTS instalation

Discussion in 'Android' started by lucianvartolomei, Oct 9, 2020.

  1. lucianvartolomei

    lucianvartolomei

    Joined:
    Oct 22, 2018
    Posts:
    23
    Just installed the latest LTS version of unity 2019 (2019.4.12) hoping it would have a newer android platform sdk bundled with it: android-29 for android 10. There seem to be some things changed in that direction from the previous version, but inside the unity path: 'C:\Program Files\Unity\Hub\Editor\2019.4.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK'
    the 'platforms' folder is missing and right in the SDK folder listed above, there is an android-10 folder.
    Trying to make a build for android with the 'Android SDK Tools installed with unity' setting from Preferences checked, and also the 'Automatic (highest installed) as a Target API Level from Player/Other Settings, gives an error: Required API level 26.

    Also the android-10 folder that seems to be misplaced in the android sdk folder instead of the 'SDK/platforms', isn't for the api-10 (Android 2.3.3 Gingerbread), right?
     
    todans likes this.
  2. AppoxV

    AppoxV

    Joined:
    Mar 4, 2017
    Posts:
    4
    I have the same problem, cannot build my game with 2019.4.12f on android because it can't find the installed SDKs.

    How do we solve this?
     
  3. bboczula

    bboczula

    Joined:
    Jan 22, 2020
    Posts:
    1
    I have this exact same problem, everything up from the 2019.3.14f1 (this is the last version where everything works, even new projects) have some issues with missing SDK. I even installed "missing" packages with Android SDK Manager and change the path in unity, but it didn't help. I recently updated Unity Hub to 2.4.1, not sure if this is relevant.
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,663
    We're aware about this issue, the fix is on the way. In the meantime, you can do a workaround like here https://forum.unity.com/threads/and...itional-sdk-platform-issue-workaround.963626/

    For ex.,
    • Close Unity
    • From Windows menu (left bottom corner), type cmd, right click, Run As administrator
    • Enter this command

    Code (CSharp):
    1. "C:\Program Files\Unity\Hub\Editor\2019.4.12f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin\sdkmanager.bat" "platforms;android-26"
    Modify Unity path accordingly. This command will install API Level 26, if you need a different API Level, change the number as needed
    • Start Unity, it should pick up newly installed API Level
    Note: This issue is present only on Windows, Mac and Linux should be unaffected.
     
  5. lucianvartolomei

    lucianvartolomei

    Joined:
    Oct 22, 2018
    Posts:
    23
    Thank you, Tomas
     
  6. BoaNeo

    BoaNeo

    Joined:
    Feb 21, 2013
    Posts:
    55
    I have this issue on Mac, so... You might want to double check that...

    Edit: I should say that I'm using 2019.4.14f1

    Edit2: I was able to get it working with sdkmanager. One thing, in case someone else gets bitten: Don't just run sdkmanager "platforms;android-##". Instead, CD into the relevant Unity folder where the SDK is stored and run ./sdkmanager so you're absolutely sure it won't launch some other sdkmanager that just happens to be on the path. The android tool chain is such a trainwreck...
     
    Last edited: Nov 9, 2020