So we're starting work on coding for an MC40, and running into an error when trying to integrate EMDK into our code. Everything works fine until I try and load the activity that initializes EMDK, and then I get the following error:
04-24 17:46:05.995 8578-8578/ I/art: Rejecting re-init on previously-failed class java.lang.Class
04-24 17:46:05.996 8578-8578/ I/art: Rejecting re-init on previously-failed class java.lang.Class
04-24 17:46:06.949 8578-8578/ I/art: Rejecting re-init on previously-failed class java.lang.Class
04-24 17:46:06.950 8578-8578/ D/AndroidRuntime: Shutting down VM
04-24 17:46:06.955 8578-8578/ E/AndroidRuntime: FATAL EXCEPTION: main
Process: , PID: 8578
java.lang.NoClassDefFoundError: .ChangeLocationActivity
at .ActionSelect$1.onClick(ActionSelect.java:41)
at android.view.View.performClick(View.java:4780)
at android.view.View$PerformClick.run(View.java:19866)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Other reading I've done online suggests that this is an issue with EMDK loading properly, but I'm not sure what direction to head to resolve it. Can anyone help?
EDIT: So I did a little more digging, and I noticed that the EMDK page only says compatibility with the MC40 when running KitKat, and I have Lollipop on this device. Do I need to downgrade it?
Starting out with EMDK// Expert user has replied. |
3 Replies
Hi Nate, I wanted to let you know that I successfully ran the Barcode API sample app on a MC40 with Lollipop. I simply changed the API level from 19 to "Google APIs, Android 22" with Build Tools version 25.0.0. BTW, I'm using Android Studio v2.3. Also added dependencies in the build.gradle from within the app section. Looks like below:
dependencies {
provided fileTree(include: ['com.symbol.emdk.jar'], dir: '/Users/yourUser/Android/android-sdk-macosx/add-ons/addon-symbol_emdk-symbol-22/libs')
compile fileTree(exclude: ['com.symbol.emdk.jar'], dir: 'libs')
}
In addition, be aware that if you're using any recent EMDK 6.3 features you will need to update the EMDK service on the MC40. The default version of EMDK service on the MC40 L is v5.0.3. You will find the EMDKOSUpdateApp_v6.3.23.apk from the "Device Update" folder within the EMDK-A-060307 install.
Thanks for your help. I'll keep this in mind for future use, but for now, I got the code working the way I wanted using the Intent option in DataWedge. If I find a case where this is no longer working the way we want it to, I'll revisit EMDK.
Hi Nate, I'm surprised but yes, according to the device compatibility in the release notes, EMDK for Android v6.3 Release Notes Support | Zebra , the latest version of EMDK does not yet support MC40 Lollipop though I imagine support will be present in an upcoming release.
Have you tried running an application which is known to work, e.g. Basic Scanning Tutorial using Barcode API - Zebra Technologies Techdocs or Barcode APIs - Zebra Technologies Techdocs ? If either of those give the same error you know it is an incompatibility with MC40 Lollipop. I haven't seen those errors before in relation to EMDK I am afraid.