Trouble linking EMDK to existing project

I'm trying to link the EMDK framework to an existing application and running into linker issues when the application runs. I've been following the basic steps from the 'Import EMDK lib JAR as a Module' section on this page:


* I created a new application in Android Studio with a default activity

* Added the com.symbol.emdk.jar library to the libs folder

* Updated AndroidManifest.xml to include <uses-permission android:name="com.symbol.emdk.permission.EMDK" /> and <uses-library android:name="com.symbol.emdk" />

* Added code to the main activity to access the EMDKManager and attach a listener


The project compiles and deploys to a device, but when I run it fails with:


06-25 16:12:46.177  13410-13410/? W/dalvikvm﹕ Class resolved by unexpected DEX: Lcom/example/matt/emdklink/MainActivity;(0x415f1df8):0x58ee7000 ref [Lcom/symbol/emdk/EMDKManager$EMDKListener;] Lcom/symbol/emdk/EMDKManager$EMDKListener;(0x415f1df8):0x5160a000

06-25 16:12:46.177  13410-13410/? W/dalvikvm﹕ (Lcom/example/matt/emdklink/MainActivity; had used a different Lcom/symbol/emdk/EMDKManager$EMDKListener; during pre-verification)

06-25 16:12:46.177  13410-13410/? W/dalvikvm﹕ Link of class 'Lcom/example/matt/emdklink/MainActivity;' failed

06-25 16:12:46.177  13410-13410/? W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x40c69438)

06-25 16:12:46.177  13410-13410/? E/AndroidRuntime﹕ FATAL EXCEPTION: main

    java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation

            at dalvik.system.DexFile.defineClass(Native Method)

            at dalvik.system.DexFile.loadClassBinaryName(

            at dalvik.system.DexPathList.findClass(

            at dalvik.system.BaseDexClassLoader.findClass(

            at java.lang.ClassLoader.loadClass(

            at java.lang.ClassLoader.loadClass(






            at android.os.Handler.dispatchMessage(

            at android.os.Looper.loop(


            at java.lang.reflect.Method.invokeNative(Native Method)

            at java.lang.reflect.Method.invoke(



            at dalvik.system.NativeStart.main(Native Method)


The device runtime is deployed on the handheld (TC55), the samples applications from the EMDK work. Ultimately we need this to work using the Cordova command line build tools, which is why I'm trying to link to the library directly and not rely on the Android Studio-specific runtime configuration.


I've pushed the project files here as well