In Visual Studio 2017 I have a barebones Xamarin.Forms project that I want to use to test scanning barcodes with ZXing. I've added FastAndroidCamera, ZXing.Net.Mobile, and ZXing.Net.Mobile.Forms Nuget packeages. Whenever I add any reference to ZXing in my Android project MainActivity class I get this error:
> The type or namespace name 'ZXing' could not be found (are you missing
> a using directive or an assembly reference?)
I get the error even if the only reference to it is
using ZXing.Net.Mobile.Forms;
This will run on the emulator without error but as soon as I try to use LivePlayer to run in on my phone or tablet It fails and the above message is displayed in the VS error list.
I've tried the Getting started info on https://components.xamarin.com/gettingstarted/zxing.net.mobile.forms without any success. I've also tried to use the official ZXing sample solutions on github but there are so many errors when I try to load the solution in VS2017 that it hasn't helped.
Is there something You need to do besides Adding the Nuget package to the project refences and adding a "using" statement?
This is not a solution to the problem with Live Player in Visual Studio 2017, but it is a work around. When I deploy directly to my Android device this runs without error. People keep warning me against using android emulators and I guess the same applies to Live Player. The moral of the story is that if an app doesn't work on an android emulator or in Live Player it might not be the fault of the app...try it on a real device.