.NET MAUI, Android emulator is not ready to be used

Hossam Fares 5 Reputation points
2024-06-22T18:32:18.0833333+00:00

I have also tried cleaning project, but it did not workI have installed x64 android emulator with API 21 on AMD CPU to get higher performance when I try to start debugging on it, I get 'There were deployment errors' and in the output window:

Waiting for emulator to be ready...
Emulator is not ready to be used.

I have followed this answer with no luck

I have tried to deploy manually to see if the issue is from the emulator or Visual Studio

  1. I have published the app to an apk
  2. and using the adb tool found in 'C:\Program Files (x86)\Android\android-sdk\platform-tools' I installed the apk using the command adb install <apk_file_path>.it installed the apk successfully and I can launch the app
  3. then I tried to start the app using adb tool so I ran the command adb shell am start -n com.package.name/.MainActivity I got:

Error type 3 Error: Activity class {com.package.name/com.package.name.MainActivity} does not exist. Failed to launch android application

  1. so I added Name property on the Activity attribute on the MainActivity class and I have set it to "com.package.name.MainActivity", after adding this property the app worked properly using adb but still same issue in Visual Studio I have also tried cleaning project, but it did not work
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,176 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,579 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.