0

I am trying to scan a barcode using BarcodeEye in Google Glass. I have followed the steps that mentioned. I have installed the app in Glass but when I start it throws following exception. Did I miss something ? I have check around the library core.jar its there and everything seems fine. Please someone help me out on this.

01-30 18:47:06.947: E/AndroidRuntime(3180): java.lang.ExceptionInInitializerError
01-30 18:47:06.947: E/AndroidRuntime(3180):     at com.github.barcodeeye.LaunchActivity.processVoiceAction(LaunchActivity.java:43)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at com.github.barcodeeye.LaunchActivity.access$0(LaunchActivity.java:38)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at com.github.barcodeeye.LaunchActivity$1.run(LaunchActivity.java:31)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at android.os.Handler.handleCallback(Handler.java:624)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at android.os.Looper.loop(Looper.java:137)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at android.app.ActivityThread.main(ActivityThread.java:4424)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at java.lang.reflect.Method.invokeNative(Native Method)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at java.lang.reflect.Method.invoke(Method.java:511)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
01-30 18:47:06.947: E/AndroidRuntime(3180):     at dalvik.system.NativeStart.main(Native Method)
01-30 18:47:06.947: E/AndroidRuntime(3180): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
01-30 18:47:06.947: E/AndroidRuntime(3180):     at com.github.barcodeeye.scan.CaptureActivity.<clinit>(CaptureActivity.java:71)
01-30 18:47:06.947: E/AndroidRuntime(3180):     ... 12 more
Steve
  • 385
  • 1
  • 16
  • I have a doubt..If we are using this library to scan bar code, do we need to zoom it as the barcode can be at any place in any size,, how google glass will detect it ? – SweetWisher ツ May 05 '14 at 05:15

1 Answers1

1

Just a suggestion.I have used zxing for scanning bar code in my app and it runs fine. I haven't faced any problem using it so i think you should try it instead.

Sheraz Ahmad Khilji
  • 8,300
  • 9
  • 52
  • 84
  • @SweetWisherツ yes it does. Though u might need to modify a few lines – Sheraz Ahmad Khilji May 05 '14 at 07:46
  • Sheraz : How can I add the zxing library in Android Studio. It gives me an error when I tried to use somethign like this. I am using Android Studio as an IDE to develop the Google Glass Application. Here is the code I am using: Intent intent = new Intent(context, com.google.zxing.client.android.CaptureActivity.class); But it gives the error saying cannot resolve symbol. The reason is that in the jar, android package is not present under client. I have added the Gradle dependency as below: compile 'com.google.zxing:core:2.3.0' – Bhargav Jhaveri Jul 23 '14 at 22:28
  • @BhargavJhaveri what worked for me was that i copied the needed source code into my Google Glass Project and i was using eclipse for Android development. What i would recommend is that you add zXing as library project instead of jar. – Sheraz Ahmad Khilji Jul 24 '14 at 05:09