Since I have started with Xamarin I have had problems getting the android debugging to work.
Every time I deploy a Xamarin Forms (PCL) project to my phone (LG G Flex 2, Android 5.1 lollipop), the deploy succeeds, enters debug mode for about 6 or 7 seconds, then goes out of the debug mode without any errors and closes the app on my phone. The app is installed however and I can use it afterwards.
I have a laptop and a pc, both running Visual Studio 2015 update 2, both have the same problem with every project.
These problems only occur when debugging for Android, not for Windows or Windows Phone, (no idea about IOS).
The output tab (Debug) only shows:
Android application is debugging. Couldn't connect to logcat, GetProcessId returned: 0
That last line is only showed on my laptop and not on my pc.
The output from Xamarin Diagnostics :
[D:RunShellCommand]: LGH955833bfe56 getprop [D:RunShellCommand]: LGH955833bfe56 getprop [D:RunShellCommand]: LGH955833bfe56 date +%s [D:RunShellCommand]: LGH955833bfe56 setprop "debug.mono.extra" "debug=127.0.0.1:8865:8866,timeout=1464533426,loglevel=0,server=y" [D:RunShellCommand]: LGH955833bfe56 am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "Project.Droid/md5ebb414a62e6ccdc1a237d6523954780b.MainActivity" [D:RunShellCommand]: LGH955833bfe56 ps [D:RunShellCommand]: LGH955833bfe56 am force-stop Project.Droid [D:RunShellCommand]: LGH955833bfe56 setprop "debug.mono.connect" ""
As you can see it forces the application to close for some reason, but i have no idea what's causing it.
On my pc the output is about the same except for 2 extra lines concerning the logcat.
Any idea on how to fix this?