title: Program type already present: androidx.work.ArrayCreatingInputMerger
body: <p><a href="https://i.stack.imgur.com/cR0Uy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cR0Uy.png" alt="enter image description here"></a>D8: Program type already present:androidx.work.ArrayCreatingInputMerger
  FAILURE: Build failed with an exception.</p>
  
  <pre><code>in  gradle.properties
  
  ```android.enableJetifier=true
  android.useAndroidX=true
  org.gradle.jvmargs=-Xmx1536M```
  
  in build.gradle
  ```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("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  }
  
  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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  
  android {
      compileSdkVersion 28
  
      lintOptions {
          disable 'InvalidPackage'
      }
  
      defaultConfig {
          // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
          applicationId "com.example.xyz"
          minSdkVersion 16
          targetSdkVersion 28
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
          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
              minifyEnabled true
              useProguard true
              // shrinkResources true
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
          }
      }
  }
  
  flutter {
      source '../..'
  }
  
  dependencies {
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
      implementation 'com.google.firebase:firebase-firestore:18.0.0'
      implementation 'com.google.firebase:firebase-core:16.0.6'
      implementation 'com.google.firebase:firebase-auth:16.1.0'
      implementation 'com.google.android.gms:play-services-auth:16.0.1'
      implementation 'com.google.firebase:firebase-database:16.0.6'
  }
  
  apply plugin: 'com.google.gms.google-services'```
  </code></pre>
  
  <p>8: Program type already present: androidx.work.ArrayCreatingInputMerger</p>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>What went wrong:
  Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.</p>
  
  <blockquote>
    <p>com.android.build.api.transform.TransformException: Error while generating the main dex list:
    Error while merging dex archives: 
    Learn how to resolve the issue at <a href="https://developer.android.com/studio/build/dependencies#duplicate_classes" rel="nofollow noreferrer">https://developer.android.com/studio/build/dependencies#duplicate_classes</a>.
    Program type already present: androidx.work.ArrayCreatingInputMerger</p>
  </blockquote></li>
  <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 4s</p>
  
  <hr>
  
  <p>The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
  See goo.gl/CP92wY for more information on the problem and how to fix it.</p>
  
  <hr>
  
  <p>Gradle task assembleDebug failed with exit code 1</p>