Why not search for ANDROID_HOME first?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
Research direction
Start in AndroidSdk/SdkLocator.cs at the PreferredPaths method, then compare its environment-variable order with the linked Android Studio Environment variables guidance. Determine the intended precedence for ANDROID_HOME and ANDROID_SDK_ROOT, simplify the method if appropriate, and confirm that the resulting paths preserve the expected SDK lookup behavior.
Written by the indexing model from the issue text.
Description
According to Android Studio's Environment variables page, ANDROID_SDK_ROOT is deprecated, so I am curious why in the PreferredPaths method under SDKLocator.cs, you search for in ANDROID_HOME before ANDROID_SDK_ROOT? Also, seems like that method could be simplified as follows.
public override string[] PreferredPaths()
{
var items = new List<string>
{
"ANDROID_HOME",
"ANDROID_SDK_ROOT"
};
var paths = new List<string>();
var config = IsWindows
? MonoDroidSdkLocator.ReadRegistry()
: MonoDroidSdkLocator.ReadConfigFile();
if (!string.IsNullOrEmpty(config.AndroidSdkPath)) paths.Add(config.AndroidSdkPath);
paths.AddRange(items.Select(Environment.GetEnvironmentVariable).Where(path => !string.IsNullOrEmpty(path))!);
return paths.ToArray();
}
- Dominant language
- C#
- Stars
- 78
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Redth/AndroidSdk.Tools
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
Redth/AndroidSdk.Tools#84 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Redth/AndroidSdk.Tools#66 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Redth/AndroidSdk.Tools#65 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Redth/AndroidSdk.Tools#64 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Redth/AndroidSdk.Tools#41 ·
All issues in Redth/AndroidSdk.Tools
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/vscode-azurefunctions#5197 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
microsoft/microsoft-ui-reactor#1274 ·