This project has moved. For the latest updates, please go here.

Android.Graphics.Bitmap problem

May 22, 2013 at 1:20 PM
When i try compile this code:
 void eButtonQR_Click( object sender, EventArgs e )
 {
   ZXing.BarcodeWriter BCW = new BarcodeWriter();
   BCW.Format = ZXing.BarcodeFormat.QR_CODE;
 }
Compiler says:
"Error 1 The type 'Android.Graphics.Bitmap' is defined in an assembly that is not referenced. You must add a reference to assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=c4c4237547e4b6cd'. C:_VS2010_\_Android_\QRCode\QRCode\ActivityMain.cs 47 7 QRCode"

When i try to compile this (without any other changes):
 void eButtonQR_Click( object sender, EventArgs e )
 {
   ZXing.BarcodeWriter BCW = new BarcodeWriter();
   // BCW.Format = ZXing.BarcodeFormat.QR_CODE;
 }
NO PROBLEM - Build Succeeded (No Errors / Warnings / ...). :-)

Mono.Android is in references.

Don't know where is problem.
Coordinator
May 22, 2013 at 1:55 PM
Which Version of Mono for Android / Xamarin.Android have you installed?
Android support of ZXing.Net is build with Mono for Android 4.2.2. I think it is to old.
Perhaps some entries in an app.config can fix it temporarily.
May 22, 2013 at 6:57 PM
I have Xamarin Android 4.6.0400 installed.
Coordinator
May 22, 2013 at 10:30 PM
Mono for Android 4.2.2. was built with a different signing key than Xamarin Android.
The assembly Mono.Android has the same version but not the same identity.
You can find a new download link in the download area called ZXing.Net.0.11.0.0-Xamarin.zip which contains a version of ZXing.Net which was built against it.
Please try it out.
May 22, 2013 at 11:27 PM
yes, it works fine. thank you.