Tech Insights
Roshan Piyadasa
March 12, 2021

How to resolve the Android/iOS SDK missing issues after upgrading Visual Studio for Mac Community 8.9.1.

How to resolve the Android/iOS SDK missing issues after upgrading Visual Studio for Mac Community 8.9.1.

I upgraded my Mac development environment with the latest visualstudio for Mac release (Visual Studio for Mac Community 8.9.1), and it suddenlyceased the development environment!

I Googled and found out the issue is common for Xamarin projectswith the latest “Visual Studio for Mac Community 8.9.1” version upgrade.

Xamarin.Android Project

When trying to compile a Xamarin.Android project itsaid that;

“/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/roshan/Library/Android/sdk'.

atSystem.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle(System.String path,
System.Boolean ignoreNotFound)[0x00032] in <36514b14425c4337b446653c547aa9c3>:0

atSystem.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.Stringdirectory,
System.IO.EnumerationOptionsoptions) [0x00048] in <36514b14425c4337b446653c547aa9c3>:0

atSystem.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor
(System.IO.Enumeration.FileSystemEnumerable`1[TResult]enumerable) [0x00000]
in <36514b14425c4337b446653c547aa9c3>:0”

Solution

Run this command on your Mac terminal

“mkdir -p ~/Library/Android/sdk”

Xamarin.iOS Project

When trying to compile Xamarin.iOS project it saidthat,

“xcode is not currently installedor could not be found”

But I had installed the latest Xcodeversion on my Mac.

Solution

Run this command on your Mac terminal

“sudo xcode-select –reset”

Reference

·        https://stackoverflow.com/questions/66479751/visual-studio-2019-fails-to-connect-to-macs-installed-visual-studio-for-mac-aft

·        https://github.com/xamarin/xamarin-android/issues/5722