Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP Universal App: ZXingScannerViewRenderer missing #422

Closed
markus507 opened this issue Sep 15, 2016 · 9 comments
Closed

WP Universal App: ZXingScannerViewRenderer missing #422

markus507 opened this issue Sep 15, 2016 · 9 comments

Comments

@markus507
Copy link

Hello,

I've installed this package on my Windows 8.1 Universal App but I don't have the Namespace:
ZXing.Net.Mobile.Forms.WindowsUniversal or ZXing.Net.Mobile.Forms.WindowsPhone.

So I cannot call ZXingScannerViewRenderer.Init();

What I'm doing wrong?

Thank you
Markus

@nkallman
Copy link

nkallman commented Sep 16, 2016

markus,

Are you receiving "System.TypeLoadException: Could not load type 'ZXing.Net.Mobile.Forms.WindowsPhone.ZXingScannerViewRenderer' from assembly 'ZXing.Net.Mobile.Forms.WindowsPhone, Version=2.1.47.0, Culture=neutral, PublicKeyToken=null'."
On app startup?

After updating to the latest version of ZXing.Net.Mobile.Forms I am now recieving the Android version of this error when I start the app up (because I call the Init() function immediately in my MainActivity)

I also updated Xamarin Studio is there possibly a conflict?
In any case this is completely breaking my app because I depend upon scanning barcodes for authentication.

@nkallman
Copy link

nkallman commented Sep 16, 2016

This may not work for you, But After I completely removed the ZXing and reinstalled the packages, ZXing started working again.

Edit: I spoke too soon, the error is back.

@dersia
Copy link

dersia commented Sep 19, 2016

I am having the same issue for Android

09-19 21:32:31.147 4051 4051 E AndroidRuntime: at ZXing.Net.Mobile.Forms.Android.Platform.Init () [0x00000] in <30849edafd8e4fbb9f24af588a9bebb0>:0
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at MyTestApp.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00027] in <7a979b3f451c4a5b96873c6bb2e0afc0>:0
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at Android.Support.V4.App.FragmentActivity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in <27c17fe440cf491ba8255bcefade6e02>:0
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at (wrapper dynamic-method) System.Object:800c1e2e-c04f-4d99-a39e-7834454d11ec (intptr,intptr,intptr)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at md52f52cd823e6c512eba2c74507e609a4a.MainActivity.n_onCreate(Native Method)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at md52f52cd823e6c512eba2c74507e609a4a.MainActivity.onCreate(MainActivity.java:30)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
09-19 21:32:31.147 4051 4051 E AndroidRuntime: ... 3 more

@nkallman
Copy link

After working on this and several other cascading errors throughout Xamarin.Forms and Xamarin Studio I was able to successfully run my project after all of my NuGet Packages had been updated. Specifically the Xamarin.Android.Support.[etc] packages

But this was tricky because they had gotten into a dependency constraint loop that wouldn't allow
them to update normally. I had to systematically delete the NuGet's and reinstall until I was able to get clean new versions of all the packages I needed.

Sorry... have fun.

@dersia
Copy link

dersia commented Sep 19, 2016

on which version are you now?

@nkallman
Copy link

nkallman commented Sep 19, 2016

According to my notes I upgraded to 23.4.0.1, however Xamarin Studio is now claiming I have 23.3.0 installed... Which would be very interesting if it auto downgraded. But I have known Xamarin Studio to present incorrect information before...

My app is still working either way...

So I guess I don't really know what the problem is or how to solve it except just keep beating it, updating things, tweaking settings...

Edit: More Info: Xamarin.Forms NuGet has a requirement that Xamarin.Android.Support.[etc] version be =23.3.0. So installing Xamarin Forms is what caused my packages to go down in version.
Also, Cleaning one project without cleaning the others caused the error to arise again, which leads me to believe this is a problem with Xamarin Studio (which makes sense because this all started after moving to the new version of Xamarin Studio)

@OmegaPrimeZ3
Copy link

I am seeing this issue as well and I dont seem to be able to get around it. I am on the latest stable of XamarinForms (2.3.2.127) using the latest release of ZXing and getting the Android Init error. Any tips. I tried updating everything, I am unable to update the Android support libraries past 23.3.0 due to Forms dependency on it. What order did you do the reference adding? What versions are you on. Like the person above, this completely breaks me.

@nkallman
Copy link

Have you tried cleaning the solution (not the project the whole solution)
Have you updated Xamarin Studio to 6.1.1 build 15
I am currently using Xamarin.Forms 2.2.0.18-pre3, Xamarin.Android.Support.xxx 23.3.0, and ZXing packages of 2.1.47 (also using Xamarin.Forms 2.3.3.152-pre2 in my PCL project)

@Redth
Copy link
Owner

Redth commented Mar 13, 2020

Thanks for reporting this issue! Unforunately it took me way too long to respond 😭. Sorry, I apologize! Recently the source code for this project was completely refactored to modernize it. Many PR's were included in this effort, and many bugs were hopefully fixed. Please try out the latest 3.x series of NuGet packages (currently in prerelease). To try and make the project more maintainable in my spare time going forward, I've decided to close all existing issues to start with a clean slate. If you're still experiencing this issue on the newest version, please open a new issue with as much detail as possible. Thank you for your patience and understanding! Happy scanning!

@Redth Redth closed this as completed Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants