Have been working on Unity 2018.3.2f1, for a PC game, for a while.
Now want to work on an Android game using the same version.
When testing build, Unity says Android SDK modules aren’t installed.
“Android SDK is missing required platform API”
Tried solutions:
When given the error message “Android SDK is missing required platform API”, I can click on “Update Android SDK”. However this loops back, saying "Make sure Android SDK path is writable by the Editor." I have tried to run Unity as Administrator, make ProgramFiles/Android and AppData/Local/Android Fully accessible by all systems, but I still get the same message.
If I click on “Use highest installed”, I get a message saying I need API level 16 but I have level 0, since I couldn’t install them.
I tried to install the modules through Unity Hub. Since I already installed Unity without the Hub, I can’t install modules directly through it, even if I add my version through Locate.
So I Remove from Hub, and try to reinstall it through hub. I look for the version on the site, then select the Android and iPhone modules.
A loading bar starts. About halfway through, it just disappears, with no message other than “You’re using the latest version of Unity Hub!”
How can I manage to properly install the Android modules?
Solved this particular issue. For anyone looking this up in the future, here is the only thing that worked after hours of trying.
The default location for the SDK (C:/Users/[User]/AppData/Local/Android/SDK) set in both Android Studio’s SDK manager and Unity caused issues of access, despite setting full access permissions and removing Read Only to the folder and its subfolders…
I changed the path directory to a new folder, C:/AndroidUnprotected. SDK Manager redownloaded and installed the tools and SDK to that location. In Unity’s Edit-Preferences-External Tools menu, at Android SDK field, I then changed the directory to the new C:/AndroidUnprotected folder and Unity correctly detected my SDK version.
I did different way, because Unity gave error message in Console. Here it is what it said:
C:\Program Files\Unity\Hub\Editor\2019.3.15f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\bin\sdkmanager.bat “platforms;android-29”
It installed android 29 sdk and now I can build apk and don’t get "Make sure Android SDK path is writable by the Editor."
So annoying just started using unity about 2 months ago. Spent 4 hours fiddling with this to get things to work. Downloaded the 2020 update. And then everything broke. Now this time around i had to RECHECK all those SDK paths… yet this full time, no android SDK changes were made…
What is happening with that warning notification, is Unity is complaining that it can’t point to the correct Android SDK Tools that your project desires. The one that comes with Unity sometimes doesn’t have all the latest Android API versions, and SDK Tools. So if you set your project to be Max API 29, or 30 (max at the time of writing this), but Unity doesn’t have it as part of its install, it gives you this warning.
Solution:
Download Android Studio
In Android Studio goto Tools->SDK Manager
Download and update all the latest SDK Platforms and SDK Tools. So in my case I went to the SDK Platforms Tab and downloaded Android 10.0 (Q) platform. Then I went to the SDK Tools tab and installed: Android SDK Build-Tools; Android SDK Command-line Tools; Android SDK Platform-Tools (and anything else you may want).
After installing the desired SDK Platforms, and SDK Tools, take note of your Android SDK Location. In my case it was “C:\Users\milam\AppData\Local\Android\Sdk”. See pic below.
In Unity goto Edit->Preferences and uncheck the box “Android SDK Tools Installed with Unity (recommended)”. Then, goto “Browse” and have it point to the SDK Tools you just installed from Android Studio, at the Android SDK Location. See pic below.
Now goto File->Build Settings
Voila! You should be able to build to your testing devices, and export your build just fine!
I hope this helps you. =)
This is the best and easiest way. Worked for me, thanks!
(I thought maybe if I updated from 2019.4.15 to 2019.4.30 that it would install the correct target API (android-30) but it did not. This is the only method after hours of searching that has worked for me.)