Reputation: 21
1.I have added below line on manifest file
<uses-library android:name="com.symbol.emdk" android:required="false" />
2.I have added below dependency as per my directory path
dependencies {
provided fileTree(include: ['com.symbol.emdk.jar'], dir: 'C:\\Users\\<YOUR USER NAME>\\AppData\\Local\\Android\\sdk\\add-ons\\addon-symbol-emdk_v4.2_API-19\\libs')
compile fileTree(exclude: ['com.symbol.emdk.jar'], dir: 'libs')}
java.lang.NoClassDefFoundError: com.sample.zebrascanengine.BarcodeScannerEngine ...
So, my question is am i doing something fundamentally wrong as in i shouldn't be using EDMK for mobile phones ? or am i missing something to get rid of the error ?
Upvotes: 2
Views: 909
Reputation: 6486
Zebra's EMDK can only be used on Zebra devices.
It is possible to have an application that uses the EMDK running on a consumer device, like your Samsung S6, but only if you avoid to do any call to the EMDK library.
The idea is that your MainActivity needs to check if the EMDK library is available on the device and only at that point you instantiate the BarcodeScanEngine class.
You can find more information about this in Zebra's EMDK reference guide.
Disclaimer: I work for Zebra Technologies.
Upvotes: 3