2 Replies Latest reply on Sep 12, 2016 7:57 AM by Antonio Coentrao

    Wrapper class instantiation error.

    Antonio Coentrao

      Following advice from Developer Event "Best practices EMDK for Android" I've encapsulated the barcode reading functionality in a wrapper class using Barcode API.

      Project compiles and runs OK, however it brakes when trying to create an instance of the wrapper class with the following error:

      java.lang.NoClassDefFoundError: pt/acoentrao/geslog/core/barcode/ZebraBarcode Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation.

       

      After some searching I think it has to do with the fact that the com.symbol.emdk jar being added twice as I need to include it in my wrapper class and the device also has the library by default and there may be a version mismatch. Due to this the Dalvik VM doesn't know exactly what to instanciate.

       

      Does this make sense? Any workaround for it?

       

      In my project I'm using:

      Android Studio 2.1.3

      com.symbol.emdk version 5.0

      My device is Motorola MC32

       

      Thanks in advance for any help.