EMDK Tutorials with Android Studio/EMDK 4.0

// Expert user has replied.
Y Yanis Dalabiras 3 years 6 months ago
4 3 0

Hi,
 
When loading one of the existing EMDK Tutorials such as EMDKMxClockTutorial into Android Studio with EMDK 4.0 installed, I get the following errors on build:
 

 
What needs to be changed in the project in order to remove this error and can we change the tutorials which are posted for download so that they load and build without errors with Android Studio ?
 
Best Regards,
Ian Hatton

Please Register or Login to post a reply

3 Replies

Y Yanis Dalabiras

Hello Ian,  The quickest way to resolve this is to add the EMDK jar as a dependency in the gradle.build file for the app module after importing the ADT sample. Instructions are here.  EMDK 4.0 will be the last version supporting Eclipse ADT, as we move forward the tutorials will be converted to Android Studio projects. 

Y Yanis Dalabiras

Hi Bill,

Thanks  - this suggestion works. Maybe we can add this note to the top of the Tutorials page so that it is clear that this change is require if using Android Studio ?

Best Regards,
Ian Hatton

P Pietro Francesco Maggi

Hi Ian,
I think you're talking about the clock tutorial: Setting The Clock With ProfileManager - Zebra Technologies Online Documentation

When you import this project in Android Studio (I'm using v1.5.1 on OS X) with EMDK v4.0 I get the same behaviour.

You need to specify in the app.build gradle file that you want to use the EMDK to compile the project.
Setting it to:

compileSdkVersion 'Symbol Technologies LLC:EMDK 4.0 (API 16):16'
from the original one that, in my case, was set to 16:

Best regards
~Pietro

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