title: Execution failed for task ':app:checkReleaseDuplicateClasses'. Flutter
body: <p>Please find below files</p>
  <p><strong>1.app/build.gradle</strong></p>
  <pre><code>def localProperties = new Properties()
  def localPropertiesFile = rootProject.file('local.properties')
  if (localPropertiesFile.exists()) {
      localPropertiesFile.withReader('UTF-8') { reader -&gt;
          localProperties.load(reader)
      }
  }
  
  def flutterRoot = localProperties.getProperty('flutter.sdk')
  if (flutterRoot == null) {
      throw new GradleException(&quot;Flutter SDK not found. Define location with flutter.sdk in the local.properties file.&quot;)
  }
  
  def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
  if (flutterVersionCode == null) {
      flutterVersionCode = '1'
  }
  
  def flutterVersionName = localProperties.getProperty('flutter.versionName')
  if (flutterVersionName == null) {
      flutterVersionName = '1.0'
  }
  
  apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  apply from: &quot;$flutterRoot/packages/flutter_tools/gradle/flutter.gradle&quot;
  
  android {
      compileSdkVersion 30
  
      sourceSets {
          main.java.srcDirs += 'src/main/kotlin'
      }
  
      defaultConfig {
          // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
          applicationId &quot;com.example.mood_reader_demo&quot;
          minSdkVersion 16
          targetSdkVersion 30
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
          multiDexEnabled true
      }
  
      buildTypes {
          release {
              // TODO: Add your own signing config for the release build.
              // Signing with the debug keys for now, so `flutter run --release` works.
              signingConfig signingConfigs.debug
          }
      }
  }
  
  flutter {
      source '../..'
  }
  
  dependencies {
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&quot;
      implementation 'com.android.support:multidex:1.0.3'
      implementation &quot;com.google.firebase:firebase-auth:19.3.0&quot;
      implementation 'com.google.android.gms:play-services-vision:20.0.0'
      implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
      implementation 'com.google.firebase:firebase-dynamic-links:19.0.0'
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'com.google.firebase:firebase-bom:25.12.0'
      implementation 'androidx.annotation:annotation:1.1.0'
      implementation &quot;com.android.support:support-v4:27.1.1&quot;
  }
  </code></pre>
  <p><strong>2. android/build.gradle</strong></p>
  <pre><code>buildscript {
      ext.kotlin_version = '1.3.50'
      repositories {
          maven {
      url &quot;https://maven.google.com&quot;
  }
  jcenter()
      }
  
      dependencies {
          classpath 'com.android.tools.build:gradle:4.1.3'
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
      }
  }
  
  allprojects {
      repositories {
          maven {
      url &quot;https://maven.google.com&quot;
  }
  jcenter()
      }
  }
  
  rootProject.buildDir = '../build'
  subprojects {
      project.buildDir = &quot;${rootProject.buildDir}/${project.name}&quot;
  }
  subprojects {
      project.evaluationDependsOn(':app')
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  <ol start="3">
  <li><p>pubspec.yaml</p>
  <p>environment:
  sdk: &quot;&gt;=2.7.0 &lt;3.0.0&quot;</p>
  <p>dependencies:
  flutter:
  sdk: flutter
  get: ^4.1.4
  image_picker: ^0.7.4
  firebase_core: ^1.0.3
  firebase_ml_vision: ^0.9.10
  firebase_auth: ^1.1.0</p>
  <p>cupertino_icons: ^1.0.2</p>
  <p>dev_dependencies:
  flutter_test:
  sdk: flutter</p>
  <p>flutter:</p>
  <p>uses-material-design: true</p>
  </li>
  </ol>
  <p><strong>4. Error</strong></p>
  <ul>
  <li><p>What went wrong:</p>
  <p>Execution failed for task ':app:checkReleaseDuplicateClasses'.</p>
  <blockquote>
  <p>A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
  &gt; Duplicate class com.google.android.gms.internal.vision.zze found in modules jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) and jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzf found in modules jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) and jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzg found in modules jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) and jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzh found in modules jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) and jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzi found in modules jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) and jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzv found in modules jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) and jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)
  Duplicate class com.google.android.gms.internal.vision.zzw found in modules jetified-play-services-vision-20.0.0-runtime (com.google.android.gms:play-services-vision:20.0.0) and jetified-play-services-vision-common-19.1.0-runtime (com.google.android.gms:play-services-vision-common:19.1.0)</p>
  </blockquote>
  <pre><code>   Go to the documentation to learn how to &lt;a href=&quot;d.android.com/r/tools/classpath-sync-errors&quot;&gt;Fix dependency resolution errors&lt;/a&gt;.
  </code></pre>
  <ul>
  <li><p>Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.</p>
  </li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p>
  </li>
  </ul>
  <p>BUILD FAILED in 23s
  Running Gradle task 'assembleRelease'...<br />
  Running Gradle task 'assembleRelease'... Done</p>
  </li>
  </ul>