Gradle support for EMDK Android 7.0

Anonymous (not verified) -
2 MIN READ
278
1

EMDK for Android 7.0 was recently released supporting a slew of new devices, enhancements to the Barcode API and adding support for Android Oreo alongside the existing Nougat and Marshmallow.

Perhaps the biggest impact for developers in EMDK for Android 7.0 is support for Gradle, making the process of including the EMDK into your application far simpler.  On both Windows and Mac, EMDK is included in the same manner, by adding a dependency into your app’s build.gradle file:

dependencies {

    compileOnly 'com.symbol:emdk:7.0.0'

    ...

}

This will pull in com.symbol.emdk from the JCenter repository.  By default jcenter() is included as a repository for all new Android Studio projects so you should not have to make any further changes to your project.

Please see Package com.symbol.emdk - zebratechnologies  for the latest available version of the EMDK

There are no longer any installers for Windows or Mac. Whereas previously the EMDK plugin to Android Studio was delivered as part of the installer, the plugin should now be downloaded from the IntelliJ plugin repository.  This makes it far easier to update both the plugin and Android Studio.

The full setup instructions for this feature are detailed on our techdocs site.

The older setup instructions are still available on our techdocs site for all earlier versions, for example the EMDK 6.9 documentation is available for Windows and Mac.

EMDK 6.9 and earlier EMDK 7.0 and later

Download & install:

Windows: Download Windows installer and run through installation process.

Mac: Download Mac .dmg and copy files to specified locations

Download & install:

No download is required

Android Studio:

Plugin is added to Android Studio as part of the installation process.

Android Studio:

Install the EMDK for Android IntelliJ plugin if required

Project:

Specify the compileSdkVersion as ‘Zebra Technologies Corp:EMDK APIs:XX’ or follow specific instructions to point to the local .jar file in your build.gradle.

Project:

Specify emdk in your gradle dependencies.  The EMDK library will be downloaded the next time you perform a Gradle sync or build.

Permissions (this step has not changed):

Add the appropriate permissions to your project

Permissions (this step has not changed):

Add the appropriate permissions to your project.

Support for Gradle and the IntelliJ plugin has been introduced in EMDK 7.0.  Note that the EMDK 6.9 versions available in those public repositories were for testing only and are not officially supported.

The Android USB Driver for Windows, previously part of the Windows installer is now available as a separate download from the Zebra download portal.

Gradle support is the single most requested feature of our EMDK for Android tool so hopefully this will make it easier to add EMDK to your projects.

profile

Anonymous (not verified)

Please Register or Login to post a reply

1 Replies

A Alessandro Caliaro

Excellent explanation Darryn