Ryan Hoo
Sep 03, 2018
7:01 am

Multiple dex define Lcom/samsung/android/knox/location/CircularGeofence


Recently, I had migrated my app following update of Knox SDK 3.X. I following the guide here and replace the previously cdm.jar, edm.jar, knox.jar, license.jar with knoxsdk.jar and supportlib.jar.

But, when I build the app, i get the following error: Multiple dex files define Lcom/samsung/android/knox/location/CircularGeofence;

Here are what I tried so far:

  1. multiDexEnabled true
  2. toggling minifyEnabled
  3. clean project and rebuild project

but the results are the same, keep getting the same error but with different package name.

Please help, thank you.

Best regards,

Ryan *****

Jenna Slomowitz
Sep 04, 2018
11:27 pm

Hello Ryan,

Could you please paste a snipet of you gradle file?

Best regards,


Ryan Hoo
Sep 05, 2018
1:13 am

Hi Jenna,

This is my gradle file.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    useLibrary  'org.apache.http.legacy'
    defaultConfig {
        applicationId "com.user.knox"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 2
        versionName "1.1"
        multiDexEnabled true
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.wang.avi:library:2.1.3'
    runtimeOnly files('libs/supportlib.jar')
    compileOnly files('libs/knoxsdk.jar')
    compile files('libs/rc.jar')
    compile files('libs/android-async-http-1.4.8.jar')
Jenna Slomowitz
Sep 06, 2018
11:07 pm

Hello Ryan,

Please try deleting the following line:

 compile fileTree(include: ['*.jar'], dir: 'libs')

Let me know if that works for you.


Ryan Hoo
Sep 13, 2018
1:17 am

Hi Jenna,

Thanks. It worked.