Search code examples
xamarin.formsnullreferenceexceptionzxing

Facing NullPointerException when loaded ZXing.net.mobile.form


I'm creating a QR Code scanner app using Xamarin and with a newly created cross-platform project, I downloaded ZXing.net.mobile.form from Nuget and I tried to run the App after downloaded, it doesn't go as expected. an Exception thrown, an Unhandled Exception: NullReferenceException.

No coding yet, the app straight down to exception. HELP~

Exception ScreenShot


Solution

  • Well it seems like I have figured out the solution. so basically, Update your XAMARIN.FORM to 3.0 and ANDROID SUPPORT to 27 then download ZXing.Net.Mobile.Form 2.4.1.

    now go to your project folder, under Android, delete BIN & OBJ folder. Back to Visual Studio, Clear & Rebuild.

    Viola~ Problem Solved