Unable to build for Android with Unity 5.6.1

I have a very simple app I am trying to test on android and every time I go to build it errors saying:

Android SDK is missing required platform API. Required API level 23.

If i click update android SDK it’s just an an endless loop with the same error showing and the same result every time I click update android SDK.

If i click cancel it has this error: UnityException: Required API level 23.
Make sure Android SDK path is writable by the Editor.

If i click Use Highest installed version it errors:
Build set to use Minimum SDK of AndroidApiLevel23 but the latest installed SDK on the system is 0.
Please use the Android SDK installation tool to install the minimum required SDK version.

I for sure have my paths right on the Android SDK. I am able to build other things from Android Studio just fine. I also moved my Android SDK install outside of Users/jacob/Library and into a folder that I put read / write permissions on for everyone.

I solved this just now by fiddling with the permissions. It was going for C:\Program Files (x86)\Android\android-sdk. So I right-clicked on that folder in Windows Explorer, Shared the folder (just to be doubly sure) and in the Security tab, edited permissions.

100076-capture.png

And then selected Edit, but I couldn’t change some permissions, so I went into Advanced and fiddled around a little bit until I could change every Group possible to have Full Control of Folder, Subfolder, and Files.

Tried again in Unity and worked like a charm.

I had a similar problem when trying to use the SDK I downloaded with android studio.

How I was able to move forward was by removing my old copy and downloading the SDK directly from the link provided by unity in:

Preferences/External Tools

96892-unity-pref.png

I’m not sure the source of the problem. I never circled back to investigate.

Hopefully it works, I’m also using 5.6.1x

yah, i have tried this as well, with no luck.

Hi @loafer , did you find any solution to your problem finally? Me too I am facing with the same issue and I can’t fix it in any way. Any kind of help would be appreciate. Thanks a lot.

either u can download the required API using SDK manager or else you can do is change the value of minimum level api required in Android Manifest

Hello Guys, I could solve it.
FINALLY I FOUND A SOLUTION!!!, the video is in spanish but that doesnt matter you just have to follow the stepts. It worked to me, good luck! Instalando SDK Tools - Android Studio - Unity FUNCIONA! 😎 - YouTube

For me it worked by updating the : (Android SDK Platform - Tools) and (Android SDK Tools) from the SDK manager under the (SDK Tools) tab.

Just manually update the package required with sdkmanager.

The sdkmanager tool is located at android_sdk/tools/bin/.

Say you want to update build-tools to version 28.0.3.

Just run:

./sdkmanager "build-tools;28.0.3"

in a command-line environment.

For anyone that finds this and is having problems with a Unity install not having an Android SDK when trying to build (I’m on 2020) here’s a potential fix I wish I would have found sooner:

windows:

  1. run CMD (command prompt) as an administrator: Right-Click “run as administrator”

  2. navigate to the Android SDK Manager installed by Unity:

    cd C:\Program Files\Unity\Hub\Editor[UNITYVERSION]\Editor\Data\PlaybackEngines\AndroidPlayer\SDK ools\bin

  3. I don’t know if you need to run the SDK here first or not, I did:

    sdkmanager.bat

  4. Run this code, adding the API version you want to install:

    sdkmanager “platform-tools” “platforms;android-30”

  5. Agree to terms: Y

Your missing SDK will now be installed, close and restart Unity if you had it open. You should now be able to do your build.
Hope that helps.

problem fixed here : Unity 2020 Android Support: Setup, SDK & NDK & JDK & Gradle - YouTube