Xamarin camera2 sample error

371 Views Asked by At

I have a problem with the new Camera2 API sample for Xamarin . I download the sample (https://developer.xamarin.com/samples/monodroid/android5.0/Camera2Basic/) but dont work. Compile OK but in the deploy the app try to open (screen blink once) and close without error. The last line of debug info is "Couldn't connect to logcat, GetProcessId returned: 0". I try to stop with breakpoint, but the execution dont reach to 1st line of OnCreate of Main Launcher. This is the only sample that do this. I use Windows 10 and Visual Studio 2015. Thanks,

1

There are 1 best solutions below

1
On BEST ANSWER
  1. Double click on your android solution
  2. Got to Android build under Build
  3. Toggle Use shared mono runtime and Fast assembly deployment (normally default checked).
  4. Close screen, try to build => same issue
  5. Repeat 1 to 4. (Toggle them again so that there checked)
  6. Now it should work. Very strange.

See comment 14 in Bugzilla https://bugzilla.xamarin.com/show_bug.cgi?id=24453

I had the same issue personally and it works here.

enter image description here