You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ResolveSdks should also look for ANDROID_SDK_ROOT #2979
Build fails with C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(703,2): error XA5300: The Android SDK Directory could not be found. Please set via /p:AndroidSdkDirectory.
The workaround is to set the Android SDK Tools registry key
By looking into the AndroidSdkWindows class I saw that it only checks the registry for specific keys and then checks for some hardcoded paths. Why not checking the ANDROID_SDK_ROOT?
Hi @jonathanpeppers
I've passed it along but it didn't seemed to be picked up. I will have to prepare some test to look at it more closely.
Still I expected .NET env. (MSBuild) to pick up the ANDROID_SDK_ROOT, as it checks the Android SDK Tools registry key that seems to be set by the Android SDK installer.
I actually expected ANDROID_SDK_ROOT to take precedence over any other reg key.
Still I expected .NET env. (MSBuild) to pick up the ANDROID_SDK_ROOT, as it checks the Android SDK Tools registry key that seems to be set by the Android SDK installer.
I actually expected ANDROID_SDK_ROOT to take precedence over any other reg key.
I think this part is a feature request you should submit on the Visual Studio Developer Community, so other people in the community can vote on it. Pull requests are also welcome! 😄
Activity
jonathanpeppers commentedon Apr 16, 2019
@savornicesei can you just use
AndroidSdkDirectory? Xamarin.Android fully embraces MSBuild so you can use this two ways:Or via an
AndroidSdkDirectoryenvironment variable set to your desired value. All MSBuild properties can be set via environment variables.savornicesei commentedon Apr 17, 2019
Hi @jonathanpeppers
I've passed it along but it didn't seemed to be picked up. I will have to prepare some test to look at it more closely.
Still I expected .NET env. (MSBuild) to pick up the ANDROID_SDK_ROOT, as it checks the Android SDK Tools registry key that seems to be set by the Android SDK installer.
I actually expected ANDROID_SDK_ROOT to take precedence over any other reg key.
Best,
Simo
jonathanpeppers commentedon Apr 17, 2019
Can you attach a diagnostic MSBuild log of your build? Or if it is just as easy for you, an MSBuild binary log would be even better.
I think this part is a feature request you should submit on the Visual Studio Developer Community, so other people in the community can vote on it. Pull requests are also welcome! 😄
jonathanpeppers commentedon Jun 24, 2019
Closing for now, let us know if you have a log and we can see why
/p:AndroidSdkDirectoryisn't working for you. Thanks!