Jimmy
Jimmy

Reputation: 1

Unable to find SDK 'Microsoft.Android.Sdk' error when using Xamarin.Legacy.Sdk on mac

I would like to use Xamarin.Legacy.Sdk to target both monoandroid11.0 and net6.0-android. When I tried to run the java binding sample on mac with visual studio mac 2022, it gave me the following error: "Unable to find SDK 'Microsoft.Android.Sdk'. SDK not found /usr/local/share/dotnet/sdk/6.0.401/Sdks/Microsoft.Android.Sdk/Sdk not found. Check that a recent enough .NET SDK is installed and/or increase the version specified in global.json."

Anyone seen this before and found a solution?

The sample project can be found on https://github.com/xamarin/Xamarin.Legacy.Sdk/blob/main/samples/JavaBinding/JavaBinding.csproj.

*I have tried this on a Windows machine, it works fine. Not sure why it is not working on mac.

Upvotes: 0

Views: 538

Answers (1)

Zack
Zack

Reputation: 1629

You can check whether the SDK version specified in the global.json file is the same as your SDK version.

For more details, you can refer to the following docs:

NETSDK1141|Microsoft Docs

global.json|Microsoft Docs

Upvotes: 0

Related Questions