Issue: During VSTS builds, you encountered errors similar to these:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(574,2): error :  Error finding Android/Java SDKs

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(574,2): error :   at Xamarin.Android.Build.Utilities.AndroidSdkBase.Initialize (System.String androidSdkPath, System.String androidNdkPath, System.String javaSdkPath) 

Cause: Visual Studio for Mac and Xamarin Studio do not automatically search for system Android SDK and NDK locations. You may encounter this when SDK or NDK path is missing in your build definition.


On MacinCloud VSTS Agent Platform:

The correct Android SDK path for Xamarin.Android is: "/usr/local/opt/android-sdk"

The correct Android NDK path for Xamarin.Android is "/usr/local/opt/android-ndk"

You can first try restarting your agent at Every time the agent is restarted the above path is configured.

If you continue to face difficulties, please contact us so we can help you to permanently resolve this issue by overwrite the default SDK and NDK path for your Xamarin.Android builds.