How to debug andoid native-activity application in the android emulator?

Maverick Xiang 21 Reputation points
2022-01-09T11:52:39.637+00:00

I use Visual Studio 2022, this is my first time to develop android application.
My steps is recorded as follows:

  1. The Native Activity project is configured as follows
    163370-step1.jpg
    2 Build
    3 Start WIthout Debugging, The emulator prompts after this step
    163268-step3.jpg
    4 Attach to Android Process
    163432-step4.jpg
    Then the Error Message occurs.
    163403-result.jpg
    How can I run the application with the emulator?
Developer technologies | Visual Studio | Debugging
0 comments No comments
{count} votes

Answer accepted by question author
  1. Anonymous
    2022-01-10T02:07:12.48+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    This issue is related to the android emulator do not start or start too slow.

    Firstly, Please install an x86-based system image emulator, I notice your emulator's name is ARM, the virtual device will not be accelerated and will run slowly.

    If you do not know how to create a x86-based system image emulator, please refer to this article: Managing Virtual Devices with the Android Device Manager step by step.

    If you create an emulator base on x86-based system image, then you need to enable the Hardware acceleration for emulator.

    Before debugging your application, please start your emulator firstly in the Android Device Manager(Launch the Android Device Manager from the Tools menu by clicking Tools > Android > Android Device Manager:), then run your application and debug it.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

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