Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Commit c8a5b5b

Browse files
authored
Check for ANDROID_HOME Sdk location on Windows. (#230)
For some reason we never check for the `%ANDROID_HOME%` environment variable on Windows. This might cause issues with people using VSCode since we probably will be using environment variables as a backup when using that IDE. Add a check to use `%ANDROID_HOME%` after checking the registry entries. This way Visual Studio and Android SDK Installer paths will still be preferred.
1 parent 05f9a90 commit c8a5b5b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ protected override IEnumerable<string> GetAllAvailableAndroidSdks ()
9393
if(CheckRegistryKeyForExecutable(root,ANDROID_INSTALLER_PATH,ANDROID_INSTALLER_KEY,wow,"platform-tools",Adb))
9494
yieldreturnRegistryEx.GetValueString(root,ANDROID_INSTALLER_PATH,ANDROID_INSTALLER_KEY,wow)??"";
9595

96+
foreach(stringdirinGetSdkFromEnvironmentVariables())
97+
yieldreturndir;
98+
9699
// Check some hardcoded paths for good measure
97100
varpaths=newstring[]{
98101
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),"Xamarin","MonoAndroid","android-sdk-windows"),

0 commit comments

Comments
 (0)