[Xamarin.Android.Tools.AndroidSdk] Add Android Studio's Android SDK paths#266
Merged
jonathanpeppers merged 1 commit intomainfrom Jan 21, 2026
Merged
Conversation
…aths
We already had code looking for this path on macOS:
~/Library/Android/sdk
This is where Android Studio installs its Android SDK. Unfortunately,
windows is at `%localappdata%\Android\Sdk` and we had no code looking
for it! I also added a path for Linux.
This will also do a `Directory.Exists()` check before returning the
new paths.
We will also have to probe for these locations *last* to preserve
existing behavior.
8 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for detecting Android SDK installations in the default Android Studio locations on Windows and Linux. Previously, only the macOS path was partially supported, and the Windows path was missing entirely.
Changes:
- Add Android Studio's default SDK path for Windows (
%LocalAppData%\Android\Sdk) - Add Android Studio's default SDK path for Linux (
~/Android/Sdk) - Add
Directory.Exists()checks before returning SDK paths on Unix systems (macOS and Linux)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs | Adds Windows path for Android Studio SDK as the last entry in the hardcoded paths list |
| src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkUnix.cs | Adds Directory.Exists() check for macOS path and adds new Linux SDK path with check and clarifying comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Redth
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We already had code looking for this path on macOS:
This is where Android Studio installs its Android SDK. Unfortunately, windows is at
%localappdata%\Android\Sdkand we had no code looking for it! I also added a path for Linux.This will also do a
Directory.Exists()check before returning the new paths.We will also have to probe for these locations last to preserve existing behavior.