How to reference Symbol EMDK while targeting Lollipop or Higher

// Expert user has replied.
J Javier Hernández 3 years 6 months ago
167 2 0

Is there a way of using the symbol EMDK libraries while compiling the Android project with API 23 ?
 
I have a working sample with EMDK scanning with a build.gradle file that reads like this:
android {
  compileSdkVersion 'Symbol Technologies, Inc.:EMDK 3.1 (API 16):16'   buildToolsVersion "23.0.1"
 
When compiling with the Symbol EMDK 3.1 API16 it works fine.
 
In my case, I target not only Enterprise units, so I am always compiling with the latest Sdk available.
So I am trying to change the sdk to 23 and add the com.symbol.emdk.jar as a dependency of the project but my app fail to run.
compileSdkVersion 23buildToolsVersion "23.0.1"
 
Is there a way to add a reference to the EMDK and still target the latest SDK ?

Please Register or Login to post a reply

2 Replies

P Pietro Francesco Maggi

Hi Javier,
at this moment the EMDK is supported only on API Level 16 or 19, however you can compile it with the latest SDK manually changing the app.gradle file,

to use the SDK you like:

compileSdkVersion 23buildToolsVersion "23.0.1"

The key point is to include the com.symbol.emdk.jar library (that you need to copy in your libs folder from the EMDK setup folder) as a provided lib, not to be compiled in your project

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'], exclude: ['com.symbol.emdk.jar'])
  compile 'com.android.support:appcompat-v7:23.0.1'   provided fileTree(dir: 'libs', include: ['com.symbol.emdk.jar'])
}

~Pietro

J Javier Hernández

Copy, pasted and like Ace Ventura says "Like a glove"
My app is loading, now I need to write make the full implementation, should not take too long and out to production in no time.
Thanks a lot.

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