Visual studio can't debug Android Xamarin app

前端 未结 9 838
萌比男神i
萌比男神i 2021-01-17 08:51

I\'ve started with Xamarin and Android using Visual Studio 2013.

When I start debugging the android app, it builds, deploys to device and then debugging in Visual St

相关标签:
9条回答
  • 2021-01-17 09:26

    This will also happen if you don't have any activity marked as your main launcher activity:

    [Activity(
        ...
        MainLauncher = true,
        ...)]
    public class MainActivity ...
    

    Easy mistake to make if you're shifting code in from a prior project and the prior project is using a splash activity and your new project is not yet doing so.

    0 讨论(0)
  • 2021-01-17 09:28

    For anyone who might still need help. Also make sure the build and deploy checkbox's are checked in the configuration manager. .

    0 讨论(0)
  • 2021-01-17 09:30

    Hyper-V manager can't be installed on Windows 7 (only the management tool gets installed) so if you get this problem, following those steps don't help.

    Here is the thing that worked for me and it's mentioned here as an answer but hasn't been marked up or marked as an answer. This is actually the best and easiest solution. nothing else worked for me.

    In Visual studio, make sure you choose the solution file (not project files) in the solution explorer. Then go "Project > [project]properties" in the left pane choose "Configuration Properties > Configuration" Now check the Deploy feature if possible. Only deployable projects have the option.

    This saved my life and I almost gave up on Xamarin. I really hope this helps others like me.....

    0 讨论(0)
  • 2021-01-17 09:41

    Another reason why Visual studio can't debug Android Xamarin app with a Hyper-V is due to you don´t have 'Deploy" option check in android project.

    Steps: 1) Enter in "Solution properties" 2) Select "Configurarion Properties" 3) Check "Deploy" in Android project.

    0 讨论(0)
  • 2021-01-17 09:41

    Go to property of app project then click android option and checked checkbox in debugging section.then run again.

    0 讨论(0)
  • 2021-01-17 09:47

    Make sure you are running on Debug mode (on target).

    Then, check the Properties of the App Project and see if it's using the Xamarin debugger instead of the VisualStudio Debugger.

    0 讨论(0)
提交回复
热议问题