{"action":"created","issue":{"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/276","repository_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile","labels_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/276/comments","events_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/276/events","html_url":"https://github.com/Redth/ZXing.Net.Mobile/issues/276","id":140629296,"number":276,"title":"TypeInitializationException: Java.Lang.ClassNotFoundException","user":{"login":"daniherculano84","id":17825026,"avatar_url":"https://avatars.githubusercontent.com/u/17825026?v=3","gravatar_id":"","url":"https://api.github.com/users/daniherculano84","html_url":"https://github.com/daniherculano84","followers_url":"https://api.github.com/users/daniherculano84/followers","following_url":"https://api.github.com/users/daniherculano84/following{/other_user}","gists_url":"https://api.github.com/users/daniherculano84/gists{/gist_id}","starred_url":"https://api.github.com/users/daniherculano84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniherculano84/subscriptions","organizations_url":"https://api.github.com/users/daniherculano84/orgs","repos_url":"https://api.github.com/users/daniherculano84/repos","events_url":"https://api.github.com/users/daniherculano84/events{/privacy}","received_events_url":"https://api.github.com/users/daniherculano84/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-14T10:10:00Z","updated_at":"2016-04-08T17:13:02Z","closed_at":null,"body":"Since I updated to last ZXing versions, I am getting this error when trying to open scanner with Galaxy Ace 2 GT-I8160 (API 10). I don't know why other devices are working normally. The exception is:\r\n\r\n```\r\nSystem.TypeInitializationException: The type initializer for 'ZXing.Mobile.MobileBarcodeScanner' threw an exception. ---> Java.Lang.ClassNotFoundException: md59d50db212e0bbf7132bbad8b3d837d51.ActivityLifecycleContextListener in loader dalvik.system.PathClassLoader[/data/app/sgdmobile.md-1.apk]\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <filename unknown>:0\r\n  at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00064] in /Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:195\r\n  at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x0001d] in /Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:203\r\n  at Android.Runtime.JNIEnv.FindClass (System.String classname) [0x00007] in /Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:494\r\n  at Android.Runtime.JNIEnv.FindClass (System.Type type) [0x00009] in /Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:434\r\n  at --- End of managed exception stack trace ---\r\n  at java.lang.ClassNotFoundException: md59d50db212e0bbf7132bbad8b3d837d51.ActivityLifecycleContextListener in loader dalvik.system.PathClassLoader[/data/app/sgdmobile.md-1.apk]\r\n  at at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)\r\n  at at java.lang.ClassLoader.loadClass(ClassLoader.java:551)\r\n  at at java.lang.ClassLoader.loadClass(ClassLoader.java:511)\r\n  at at mono.android.preference.Preference_OnPreferenceClickListenerImplementor.n_onPreferenceClick(Native Method)\r\n  at at mono.android.preference.Preference_OnPreferenceClickListenerImplementor.onPreferenceClick(Preference_OnPreferenceClickListenerImplementor.java:29)\r\n  at at android.preference.Preference.performClick(Preference.java:812)\r\n  at at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:190)\r\n  at at android.widget.AdapterView.performItemClick(AdapterView.java:284)\r\n  at at android.widget.ListView.performItemClick(ListView.java:3740)\r\n  at at android.widget.AbsListView$PerformClick.run(AbsListView.java:2000)\r\n  at at android.os.Handler.handleCallback(Handler.java:587)\r\n  at at android.os.Handler.dispatchMessage(Handler.java:92)\r\n  at at android.os.Looper.loop(Looper.java:130)\r\n  at at android.app.ActivityThread.main(ActivityThread.java:3691)\r\n  at at java.lang.reflect.Method.invokeNative(Native Method)\r\n  at at java.lang.reflect.Method.invoke(Method.java:507)\r\n  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)\r\n  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)\r\n  at at dalvik.system.NativeStart.main(Native Method)\r\n  --- End of inner exception stack trace ---\r\n  at SGDMobile.MD.PreferencesSGD+<leerQR_PreferenceClick>d__1a.MoveNext () [0x00021] in d:\\Desarrollo\\Mono\\SGDMobile\\SGDMobile.MD\\PreferencesSGD.cs:413\r\n  at --- End of stack trace from previous location where exception was thrown ---\r\n  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <filename unknown>:0\r\n  at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) [0x00000] in <filename unknown>:0\r\n  at Android.App.SyncContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18\r\n  at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36\r\n  at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/2970/46c3f7e0/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:71\r\n  at at (wrapper dynamic-method) System.Object:9ff0e2bb-f7c4-48b5-bcfd-78b30e1d0857 (intptr,intptr)\r\n\r\n```\r\n\r\nAnd the line that throws the exception is the first on we initialize Scanner or call constructor :\r\n\r\n```\r\n//both lines throw exception separatelly\r\nMobileBarcodeScanner.Initialize(Application);\r\nMobileBarcodeScanner scanner = new MobileBarcodeScanner();\r\n```\r\n\r\nI must say that the problem occurs not only with my application but also the library sample for Android.\r\n\r\nWaiting your news. Thanks."},"comment":{"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/comments/207521175","html_url":"https://github.com/Redth/ZXing.Net.Mobile/issues/276#issuecomment-207521175","issue_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/276","id":207521175,"user":{"login":"Redth","id":271950,"avatar_url":"https://avatars.githubusercontent.com/u/271950?v=3","gravatar_id":"","url":"https://api.github.com/users/Redth","html_url":"https://github.com/Redth","followers_url":"https://api.github.com/users/Redth/followers","following_url":"https://api.github.com/users/Redth/following{/other_user}","gists_url":"https://api.github.com/users/Redth/gists{/gist_id}","starred_url":"https://api.github.com/users/Redth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Redth/subscriptions","organizations_url":"https://api.github.com/users/Redth/orgs","repos_url":"https://api.github.com/users/Redth/repos","events_url":"https://api.github.com/users/Redth/events{/privacy}","received_events_url":"https://api.github.com/users/Redth/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T17:13:02Z","updated_at":"2016-04-08T17:13:02Z","body":"Ahh so technically only android 4.0.3 and higher are supported.\r\n\r\nI'll have a look and see if it's possible to keep down to API level 9, as I know there's some code that already works that way."}}