Dependencies

To avoid clashes resulting from the dependencies included in the SDK libraries, Verint has relocated some of the smaller dependencies, but requires you to include some dependencies in your app to support the SDK.

Required Dependencies

The following libraries must be available to your project to support the SDK:

  • com.google.code.gson:gson v2.6.2
  • com.android.support:appcompat-v7:26.1.0

When using Gradle, these dependencies are added automatically as part of the build process and should not require any special setup. Maven may require you to manually specify these dependencies, as listed below.

Dealing With Dependency Conflicts When Using Gradle

After adding dependencies, you may encounter dependency conflicts. These can be resolved using the following tips:

If you receive Duplicate files copied in APK META-INF/DEPENDENCIES
The files contained in the META-INF folder do not affect app function and can be excluded. Add the following lines to your build.gradle:

android {
  packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
  }
}

You can add multiple exclusions here to deal with as many duplicate files as come up during your build.

If you receive java.util.zip.ZipException: duplicate entry:<CLASS NAME>
This happens when one of the dependencies (indicated by ) has already been added elsewhere. You must identify which library is duplicated by inspecting the package structure of and remove one of the references to that library. This should be as simple as removing one of the lines mentioned above.

Adding Dependencies Using Maven

Dependencies can be added in Maven using the markup below:

<dependency>
    <groupId>com.google.code.gson</groupId>
    <artifactId>gson</artifactId>
    <version>2.6.2</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>com.android.support</groupId>
    <artifactId>appcompat-v7</artifactId>
    <version>26.1.0</version>
    <scope>compile</scope>
</dependency>

Dealing With Dependency Conflicts When Using Maven

If you receive java.lang.NoClassDefFoundError: Failed resolution of: <CLASS NAME>
This indicates that a package is missing. You must identify which package it is from and add in the relevant dependency.

If you receive java.lang.IllegalArgumentException: already added: <CLASS NAME>
This indicates that a library has been added as a dependency in two separate places. To resolve the conflict, you must find out what library is indicated by the package descriptor in and remove it from the dependencies you included from the list above.

It's also possible in Maven to exclude part of a dependency using the tag, e.g.:

<dependency>
    <groupId>com.actionbarsherlock</groupId>
        <artifactId>library</artifactId>
        <version>4.2.0</version>
        <type>apklib</type>
        <exclusions>
            <exclusion>
                <groupId>com.google.android</groupId>
                <artifactId>support-v4</artifactId>
        </exclusion>
    </exclusions>
</dependency>

If you receive java.lang.NoClassDefFoundError: Failed resolution of: <CLASS NAME>
This indicates that a package is missing. You must identify which package it is from and add in the relevant dependency.