I had to set the `ANDROID_NDK_HOME` environment variable to `C:\Users\nathanaldensr\AppData\Local\An
I had to set the
ANDROID_NDK_HOME
environment variable to C:\Users\nathanaldensr\AppData\Local\Android\Sdk\ndk\21.0.6113669
.11 Replies
So, to summarize:
1. Install OpenJDK 8 (I installed OpenLogic's). Choose not to include Java in
PATH
and do not set JAVA_HOME
. This is needed to run sdkmanager.bat
later.
2. Install Microsoft's OpenJDK 11. Choose to include Java in PATH
and set JAVA_HOME
. This is needed by Silk.NET.
3. Install Android Studio.
4. In Android Studio, install Android 11.0 SDK platform, Android 8.0 SDK platform, Android SDK build tools 28.0.2, and NDK 21.0.6113669.
5. Set the ANDROID_HOME
user environment variable to C:\Users\<user>\AppData\Local\Android\Sdk
.
6. Set the ANDROID_NDK_HOME
user environment variable to C:\Users\<user>\AppData\Local\Android\Sdk\ndk\21.0.6113669
.
7. Open PowerShell (might need administrator) and run the following to accept all licenses (path to OpenJDK 8 might differ based on which one was installed):
man what a mess
Might be able to use
%USERPROFILE%
to abstract away the root folders.Well I reckon it depends
As there are so many ways to get the Android SDK
e.g. I think Visual Studio’s manager puts it somewhere in program files
I also am getting just a couple of failures during build related to not having Android SDK Platform 31 installed, even though I clearly have it.

This error appears to be .NET-specific.
Grrr
So I have no idea how Xamarin locates Android SDK
You’ve definitely got everything installed though, so it’s defo a Xamarin problem
Documentation is useful /s

lmao
Found it. 😉 https://github.com/xamarin/xamarin-android/blob/main/src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.cs#L440
This is the method that points to: https://github.com/xamarin/xamarin-android-tools/blob/eaec4e3ac7f8073dac93412b2a13b3a571c48e0a/src/Xamarin.Android.Tools.AndroidSdk/AndroidSdkInfo.cs#L99
Code is too deep for me to determine how it works on GitHub.