Visual Studio for Mac looking for Android SDK in wrong place

Joe Manke 1,091 Reputation points
2021-03-16T22:11:06.007+00:00

I just updated VS for Mac from 8.7.9 to 8.9.1, and now I am unable to compile Android projects. (To be honest, I don't know if the upgrade is relevant at all. I typically use Windows for development and only touch VS for Mac to do iOS when the remote connection is being problematic.)

In Visual Studio Preferences, the Android SDK is set to the default, /Library/Developer/Xamarin/android-sdk-macosx. However, when I try to compile an Android project, I get this error message:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Tooling.targets(5,5): Error XARSD7023: System.IO.DirectoryNotFoundException: Could not find a part of the path '/Users/mankej2/Library/Android/sdk'.

If I copy my Android SDK to that location (even without changing the SDK location in Preferences) the build succeeds. But how do I make the build actually target the correct SDK location?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,598 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful