RuntimeException: stub - EMDKManager.getEMDKManager(Unknown Source)

// Expert user has replied.
S Son Dang 3 years 7 months ago
894 1 0

Hey, I just started code an Android app to connect to the MZ-220 printer via Bluetooth and I got this error
java.lang.RuntimeException: stub
                                                                                     at com.symbol.emdk.EMDKManager.getEMDKManager(Unknown Source)
                                                                                     at com.symbol.devtalks_scanandpair.Main2Activity.start(Main2Activity.java:26)
                                                                                     at com.symbol.devtalks_scanandpair.Main2Activity$1.onClick(Main2Activity.java:20)
                                                                                     at android.view.View.performClick(View.java:4438)
                                                                                     at android.view.View$PerformClick.run(View.java:18422)
                                                                                     at android.os.Handler.handleCallback(Handler.java:733)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                     at android.os.Looper.loop(Looper.java:136)
                                                                                     at android.app.ActivityThread.main(ActivityThread.java:5017)
                                                                                     at java.lang.reflect.Method.invokeNative(Native Method)
                                                                                     at java.lang.reflect.Method.invoke(Method.java:515)
                                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                                                                                     at dalvik.system.NativeStart.main(Native Method)
I tried very ways but still didn't work
- compile project(':com.symbol.emdk')     :RuntimeException: stub
- compileSdkVersion 'Symbol Technologies LLC:EMDK APIs:23'    :Didn't find class "com.symbol.emdk.EMDKManager$EMDKListener" on path: DexPathList[[zip file "/data/app/com.symbol.scanandpairsample1-1/base.apk"],nativeLibraryDirectories=[/data/app/com.symbol.scanandpairsample1-1/lib/arm64, /system/lib64, /vendor/lib64]
-      :NSTALL_FAILED_MISSING_SHARED_LIBRARY
 
Currently, I am using the latest Android version and EMDK 6.4
Hope someone knows this.

Please Register or Login to post a reply

1 Replies

B Bhakta Ranjan Satapathy

Hello Dang,

I hope you have added dependency to your build.gradle.

dependencies {
provided fileTree(include: ['com.symbol.emdk.jar'], dir: 'C:\\Users\\\\AppData\\Local\\Android\\sdk\\add-ons\\addon-symbol-emdk_v4.0_API-19\\libs')
compile fileTree(exclude: ['com.symbol.emdk.jar'], dir: 'libs')
}

Please find the details @Creating Project using Android Studio - Zebra Technologies Techdocs

And you have mentioned below in your android_manifest.xml.

Then you must enable the EMDK library in your application node:

​Thanks

CONTACT
Can’t find what you’re looking for?