title: How to resolve Duplicate Class error in Android
body: <ol>
  <li><p>I am getting Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-javalite-3.11.0.jar (com.google.protobuf:protobuf-javalite:3.11.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1).</p>
  </li>
  <li><p>I have not seen an answer that clears up my issue. I appreciate any assistance.</p>
  <pre><code> apply plugin: 'com.android.application'
   apply plugin: 'idea'
   apply plugin: 'io.fabric'
   apply plugin: 'kotlin-android'
   apply plugin: 'kotlin-kapt'
   apply plugin: 'kotlin-android-extensions'
   apply plugin: &quot;io.spring.dependency-management&quot;
   apply plugin: 'androidx.navigation.safeargs.kotlin'
  
  
  
   android {
       compileSdkVersion target_sdk_version
       buildToolsVersion &quot;29.0.2&quot;
       android.buildFeatures.dataBinding
  
  
   defaultConfig {
       applicationId &quot;com.example.app&quot;
       minSdkVersion 29
       targetSdkVersion target_sdk_version
       multiDexEnabled true
       versionCode 1
       versionName &quot;1.0&quot;
       multiDexEnabled true
       testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
       vectorDrawables.useSupportLibrary = true
  
   }
  
   packagingOptions {
       exclude 'META-INF/main.kotlin_module'
   }
  
   buildTypes {
       release {
           minifyEnabled false
           proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
           debuggable = true
       }
       debug {
           minifyEnabled false
           testCoverageEnabled false
       }
   }
   dataBinding {
       enabled = true
   }
  
   productFlavors {
   }
  
   lintOptions {
       abortOnError false
   }
  
   kotlinOptions {
       jvmTarget = JavaVersion.VERSION_1_8
   }
   sourceSets {
  
       main {
           main.java.srcDirs += 'src/main/kotlin'
  
       }
   }
  
   compileOptions {
       sourceCompatibility '1.8'
       targetCompatibility '1.8'
       kotlinOptions {
           jvmTarget = JavaVersion.VERSION_1_8.toString()
       }
   }
  
   lintOptions {
       abortOnError false
       disable 'GradleDependency', 'GoogleAppIndexingWarning'
   }
  
   configurations.all {
       resolutionStrategy.eachDependency { DependencyResolveDetails details -&gt;
           def requested = details.requested
           if (requested.group == 'org.jetbrains.kotlin' &amp;&amp; requested.name == 'kotlin-reflect') {
               details.useVersion kotlin_version
                }
           }
       }
   }
  
   buildscript {
       ext {
          gson_version = &quot;2.8.2&quot;
          dagger_version = '2.25.2'
          rx_version = '2.2.15'
          glide_version = &quot;4.7.1&quot;
          rx_firebase_version = &quot;1.1.3&quot;
          support_version = '28.0.0'
          rx_android_version = '2.1.1'
          glide_version = '4.11.0'
          target_sdk_version = 29
       }
   }
  
  
  
   dependencies {
  
       implementation fileTree(dir: 'libs', include: ['*.jar'])
       def nav_version = &quot;2.3.0&quot;
       def lifecycle_version = &quot;2.2.0&quot;
       def arch_version = &quot;2.1.0&quot;
       def firebase_config = '19.2.0'
       implementation (&quot;com.google.firebase:firebase-config:$firebase_config&quot;,{
           // protobuf-lite that firebase-config and Tink depends on.
           exclude group: 'com.google.protobuf',module: 'protobuf-javalite'
           exclude group: 'com.google.protobuf',module: 'protobuf-lite'
       })
  
       //Base SDK
       implementation 'com.amazonaws:aws-android-sdk-appsync:3.0.2'
       implementation 'com.amazonaws:aws-android-sdk-core:2.16.13'
  
       //Dagger
       implementation 'com.google.dagger:dagger-android:2.28.1'
       kapt 'com.google.dagger:dagger-compiler:2.28.1'
       kapt 'com.google.dagger:dagger-android-processor:2.28.1'
       implementation 'com.google.dagger:dagger-android-support:2.28.1'
  
       //Firebase/Amazon
       implementation 'com.amazonaws:aws-android-sdk-iot:2.16.13'
       implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.16.13'
       implementation &quot;com.firebase:firebase-jobdispatcher:0.8.6&quot;
       implementation 'com.firebaseui:firebase-ui-auth:5.0.0'
       implementation 'com.google.firebase:firebase-analytics:17.4.4'
       implementation 'com.google.firebase:firebase-auth:19.3.2'
       implementation 'com.google.firebase:firebase-core:17.4.4'
       implementation 'com.google.firebase:firebase-database:19.3.1'
       implementation 'com.google.firebase:firebase-firestore:21.5.0'
       implementation 'com.google.firebase:firebase-storage:19.1.1'
  
       ///Glide
       implementation &quot;com.github.bumptech.glide:glide:$glide_version&quot;
       kapt &quot;com.github.bumptech.glide:compiler:$glide_version&quot;
  
       //JETBRAINS
       implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72'
  
       //Kotlin
       implementation 'org.jetbrains.kotlin:kotlin-reflect:1.3.72'
       implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
       implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
       implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1'
  
       //Lifecycle
       // https://mvnrepository.com/artifact/android.arch.lifecycle/common-java8
       implementation(group: 'androidx.lifecycle', name: 'lifecycle-common-java8', version: '2.2.0')
  
       // Annotation processor
       // alternately - if using Java8, use the following instead of lifecycle-compiler
       implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
       implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
       implementation &quot;androidx.lifecycle:lifecycle-service:$lifecycle_version&quot;
       implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0-alpha05'
       implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-alpha05'
       implementation &quot;androidx.navigation:navigation-dynamic-features-fragment:2.3.0&quot;
       implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
       implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
  
       // optional - ReactiveStreams support for LiveData
       implementation &quot;androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version&quot;
       // optional - ProcessLifecycleOwner provides a lifecycle for the whole application process
       implementation &quot;androidx.lifecycle:lifecycle-process:$lifecycle_version&quot;
       // optional - Test helpers for LiveData
       testImplementation &quot;androidx.arch.core:core-testing:$arch_version&quot;
  
       kapt 'androidx.databinding:databinding-compiler:4.0.0'
       implementation 'com.squareup.retrofit2:retrofit:2.9.0'
       implementation 'com.squareup.okhttp3:logging-interceptor:4.8.0'
       implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
       implementation 'com.squareup.okhttp3:okhttp:4.8.0'
  
       //Mini
       implementation 'com.github.pabloogc:Mini:1.0.5'
       kapt 'com.github.pabloogc.Mini:mini-processor:1.0.5'
       annotationProcessor 'com.github.pabloogc.Mini:mini-processor:1.0.5'
  
       // Required for Cognito
       implementation('com.amazonaws:aws-android-sdk-cognitoauth:2.16.13@aar') { transitive = true }
  
       //Rx
       implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
       implementation &quot;io.reactivex.rxjava2:rxandroid:$rx_android_version&quot;
       implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar'
  
       //Support
       implementation 'androidx.activity:activity-ktx:1.2.0-alpha06'
       implementation 'androidx.annotation:annotation:1.1.0'
       implementation 'androidx.appcompat:appcompat:1.1.0'
       implementation 'androidx.browser:browser:1.2.0'
       implementation 'androidx.cardview:cardview:1.0.0'
       implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta8'
  
       implementation 'androidx.core:core-ktx:1.3.0'
       implementation 'androidx.core:core:1.5.0-alpha01'
       implementation 'androidx.fragment:fragment:1.3.0-alpha06'
       implementation 'androidx.fragment:fragment-ktx:1.3.0-alpha06'
       implementation 'androidx.gridlayout:gridlayout:1.0.0'
       implementation 'androidx.legacy:legacy-support-v4:1.0.0'
       implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
  
       implementation 'androidx.preference:preference:1.1.1'
       implementation 'androidx.preference:preference-ktx:1.1.1'
       implementation 'androidx.recyclerview:recyclerview:1.1.0'
       implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
       implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
       implementation 'androidx.viewpager2:viewpager2:1.0.0'
  
       implementation 'com.google.android.material:material:1.3.0-alpha01'
       implementation 'com.google.android.gms:play-services-auth:18.0.0'
       implementation 'com.google.android.gms:play-services-maps:17.0.0'
       implementation 'com.google.android.gms:play-services-location:17.0.0'
       implementation 'com.google.android.gms:play-services-places:17.0.0'
  
       implementation 'com.google.code.gson:gson:2.8.6'
       implementation 'com.google.android.libraries.places:places:2.3.0'
       implementation 'com.google.guava:guava:29.0-jre'
  
  
       implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
       implementation 'com.karumi:dexter:6.2.1'
       implementation 'com.pavelsikun:material-seekbar-preference:2.3.0'
       implementation 'info.guardianproject.panic:panic:1.0'
       implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
       implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
       implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
  
       //Test
       testImplementation 'junit:junit:4.13'
       testImplementation 'com.natpryce:hamkrest:1.7.0.0'
       testImplementation &quot;org.jetbrains.kotlin:kotlin-test:$kotlin_version&quot;
       testImplementation 'org.junit.platform:junit-platform-runner:1.6.2'
       androidTestImplementation &quot;androidx.navigation:navigation-testing:$nav_version&quot;
       androidTestImplementation 'androidx.test:runner:1.3.0-rc01'
       androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-rc01'
  
   }
   repositories {
   google()
   mavenCentral()
   maven { url &quot;http://dl.bintray.com/jetbrains/spek&quot; }
   apply plugin: 'com.google.gms.google-services'
   //kotlin annotation processor
   apply plugin: 'kotlin-kapt'
  
   apply plugin: &quot;androidx.navigation.safeargs.kotlin&quot;
  
   }
  
   kotlin {
   experimental {
       coroutines &quot;enable&quot;
       }
   }
   ...
  </code></pre>
  </li>
  </ol>