title: Duplicate class com.google.common found in modules guava error after migrating to Androidx
body: <p>This is my build.gradle file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.app"
          multiDexEnabled true
          minSdkVersion 26
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
      packagingOptions {
          exclude 'META-INF/DEPENDENCIES'
          exclude 'META-INF/INDEX.LIST'
      }
  }
  
  configurations {
      all*.exclude group: 'com.google.guava', module: 'listenablefuture'
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'com.squareup.picasso:picasso:2.71828'
      implementation 'com.facebook.shimmer:shimmer:0.2.0'
      implementation 'androidx.multidex:multidex:2.0.0'
      testImplementation 'junit:junit:4.12'
      implementation 'com.victor:lib:1.0.4'
      implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
      implementation 'net.gotev:speech:1.3.1'
      implementation files('libs/YouTubeAndroidPlayerApi.jar')
      implementation 'com.facebook.fresco:fresco:1.3.0'
      implementation 'com.haozhang.libary:android-animated-recording-view:1.0'
      implementation 'com.github.arimorty:floatingsearchview:2.1.1'
      implementation 'com.google.apis:google-api-services-youtube:v3-rev204-1.23.0'
      implementation 'com.shawnlin:number-picker:2.4.6'
      implementation 'com.unstoppable:submitbutton:1.1.3'
      implementation 'ru.github.igla:ferriswheel:1.1.1'
      implementation 'com.github.Yalantis:Context-Menu.Android:1.0.8'
     // implementation 'com.android.support:cardview-v7:23.+'
      implementation 'com.jaredrummler:material-spinner:1.2.5'
      implementation 'com.github.clans:fab:1.6.4'
      implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
      implementation 'com.mapzen.android:speakerbox:1.4.1'
      implementation 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
  
  
      implementation 'com.google.android.material:material:1.0.0'
      implementation 'androidx.appcompat:appcompat:1.1.0'
      implementation 'androidx.core:core:1.1.0'
  
      implementation group: 'com.google.cloud', name: 'google-cloud-speech', version: '1.22.0'
  
  }
  </code></pre>
  
  <p>I am getting this error when I try to build my project:</p>
  
  <pre><code>Duplicate class com.google.common.annotations.Beta found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.annotations.GwtCompatible found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.annotations.GwtIncompatible found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.annotations.VisibleForTesting found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Absent found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.AbstractIterator found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.AbstractIterator$1 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.AbstractIterator$State found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Ascii found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CaseFormat found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CaseFormat$1 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CaseFormat$2 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CaseFormat$3 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CaseFormat$4 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CaseFormat$5 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CaseFormat$StringConverter found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher$1 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher$And found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher$BitSetMatcher found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher$FastMatcher found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher$NegatedFastMatcher found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher$Or found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.CharMatcher$RangesMatcher found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Charsets found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Converter found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Converter$1 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Converter$1$1 found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Converter$ConverterComposition found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Converter$FunctionBasedConverter found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  Duplicate class com.google.common.base.Converter$IdentityConverter found in modules guava-28.1-android.jar (com.google.guava:guava:28.1-android) and guava-jdk5-17.0.jar (com.google.guava:guava-jdk5:17.0)
  </code></pre>
  
  <p>How to fix this?</p>