macOS Sonoma: Android SDK is not working in my .NET Maui app in Visual Studio Code but it works in Visual Studio for Mac for the same .NET Maui app

I always get the same message in Visual Studio Code when I create a new .NET MAUI app: Android SDK: Install required


ACTION REQUIRED:


The required Android SDK components need to be installed. You can install them from the command palette by choosing '.NET MAUI: Configure Android', selecting 'How to configure Android', and following the instructions. Take into account that the Maui Android SDK recommends specific component versions and if you decide to not use them the build/debug may not work well.

Another option is to use the Android SDK Manager tool from Visual Studio to install the Android Sdk components.

Alternatively, you can try installing the components by opening a Terminal, navigating to directory '/Users/name/Library/Developer/Xamarin/android-sdk-macosx/cmdline-tools/7.0/bin' and then running: 'sdkmanager "build-tools;34.0.0"'. Licenses needs to be accepted running: 'sdkmanager --licenses --verbose'. After that, please verify if the android-sdk-license file exist into the licenses directory on '/Users/name/Library/Developer/Xamarin/android-sdk-macosx'. If this keeps failing, please try deleting the licenses folder and accepting the licenses again.


https://learn.microsoft.com/en-us/dotnet/maui/get-started/installation?view=net-maui-8.0&tabs=visual-studio-code


I have tried to install the Android SDK in Visual Studio Code but it was still not working.


Then I created a new .NET Maui app in Visual Studio for Mac and the Android SDK was automatically installed and the app was running on my Android tablet. After that I opened the folder of this app in Visual Studio Code but then I still get the same message Android SDK: Install required.


Why is the Android SDK not working in Visual Studio Code? I use macOS Sonoma 14.2 and I have an Intel iMac.

iMac 27″, macOS 14.2

Posted on Dec 19, 2023 11:19 AM

Reply

Similar questions

2 replies

Dec 19, 2023 11:30 AM in response to Flying_Red_Panda

Best re-ask this in whatever forums are used by the folks that are familiar with that Android SDK.


Apparently, that’s Microsoft:

https://learn.microsoft.com/en-us/dotnet/maui/get-started/first-app?view=net-maui-8.0&tabs=vswin&pivots=devices-android


This isn’t the best spot for .NET and C# and VSC and cross-platform development questions.


Above question was also posted to StackOverflow, which is one of the places Microsoft suggests asking, though Microsoft does seem to suggest tagging questions posted there with .net.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

macOS Sonoma: Android SDK is not working in my .NET Maui app in Visual Studio Code but it works in Visual Studio for Mac for the same .NET Maui app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.