Skip to content

Conversation

@dellis1972
Copy link
Contributor

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.

So lets check those last in the list of paths. This way we will pick up all the other defaults and backups before trying the environment variable.

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.

So lets check those last in the list of paths. This
way we will pick up all the other defaults and backups
before trying the environment variable.
@dellis1972 dellis1972 requested a review from jonpryor April 10, 2024 13:53
@dellis1972
Copy link
Contributor Author

I added this becuse when writing the docs, I found that from the command line on windows you either have to

  1. Provide the AndroidSdkDirectory argument via -p:AndroidSdkDirectory.
  2. do set AndroidSdkDirectory=c:\foo

ANDROID_HOME or ANDROID_SDK_ROOT just didn't work, they are ignored.

@jonpryor jonpryor merged commit c8a5b5b into dotnet:main Apr 17, 2024
@dellis1972 dellis1972 deleted the checkenvvar branch April 17, 2024 11:48
jonpryor pushed a commit that referenced this pull request Apr 22, 2024
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.
jonpryor added a commit to dotnet/android that referenced this pull request Apr 22, 2024
jonpryor added a commit to dotnet/android that referenced this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants