Reputation: 31
Whenever I try to start the HelloMaui project from VS Code using NET 6.0.100 Preview4 with mono debug extension installed and run it it throws an error Xamarin.Android.Common.Debugging.targets(604,5): error XA0010: No available device. I wonder if anyone had a problem running the sample project?
Upvotes: 2
Views: 1872
Reputation: 9721
The same bug has been reported 3 days ago in the official repo https://github.com/dotnet/maui/issues/1197, as MAUI still in an early stage it better to follow on the official repo.
Try to ensure that the emulator is ready before debugging the app (build+deploy), by starting it manually.
Not sure how to do it from vs code but probably will be common for command line:
C:\*\Android\android-sdk\emulator
emulator -list-avds
You should see at least one emulator name otherwise you need to install one.emulator.exe -avd NameOfYourEmulator -partition-size 512
NameOfYourEmulator taken from the previous step.https://learn.microsoft.com/en-us/xamarin/android/deploy-test/command-line-emulator
If the returned list of Android device emulators is empty (from step 2) and you are sure you have at least one emulator previously added/installed then try unloading and reloading the android project.
If you are not sure, you may open Android device manager from visual studio and check the listed devices there, if empty then you need to add at least one.
Related issue Maui-check fails on Android Emulator Setup
Upvotes: 1