title: Error while merging multiple dex files (Android Studio and Flutter)
body: <p>When I build my project, I keep getting this error about some dex files that could not be merged.</p>
  
  <p>I've tried migrating to AndroidX but when I do that, it says that I have no AndroidX usages. I've deleted the .gradle file, I've run 'flutter clean', I've closed and opened Android Studio again and nothing. Also, I've tried the 'solutions' to similiar previously asked questions about this kind of issue.</p>
  
  <p>THESE ARE MY DEPENDENCIES:</p>
  
  <hr>
  
  <pre><code>name: animal_recog
  description: 
  
  environment:
    sdk: "&gt;=2.1.0 &lt;3.0.0"
  
  dependencies:
    flutter:
      sdk: flutter
    flutter_facebook_login: ^1.1.1
    http: ^0.12.0+2
    json_annotation: ^2.0.0
    image_picker: 0.4.12+1
    flutter_auth_buttons:
    camera: ^0.2.9+1
    path_provider: 0.4.1
    multi_image_picker: 4.3.6
  
  dev_dependencies:
    flutter_test:
      sdk: flutter
    build_runner: ^1.0.0
    json_serializable: ^2.0.0
  </code></pre>
  
  <p>THIS IS THE COMPLETE ERROR LOG:</p>
  
  <hr>
  
  <p>D8: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver</p>
  
  <p>FAILURE: Build failed with an exception.</p>
  
  <ul>
  <li><p>What went wrong:</p>
  
  <blockquote>
    <p><code>Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
    com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/0.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/1.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/2.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/3.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/8.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/9.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/10.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/11.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/12.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/13.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/14.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/15.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/16.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/17.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/18.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/19.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/20.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/21.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/22.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/23.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/24.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/25.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/26.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/27.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/28.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/29.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/30.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/31.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/32.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/33.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/34.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/35.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/36.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/37.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/38.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/39.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/40.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/41.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/42.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/43.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/44.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/45.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/46.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/47.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/48.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/49.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/50.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/51.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/52.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/53.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/54.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/55.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/56.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/57.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/58.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/59.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/60.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/61.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/62.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/63.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/64.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/65.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/66.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/67.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/68.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/69.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/70.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/71.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/72.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/73.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/74.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/75.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/76.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/77.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/78.jar, /Users/gabrielspranger/Desktop/AndroidStudioProjects/animal_recog/build/app/intermediates/transforms/dexBuilder/debug/79.jar
    Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
    Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver</code></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 (url)</p></li>
  </ul>
  
  <p>BUILD FAILED in 23s</p>
  
  <hr>
  
  <p>The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
  See (URL) for more information on the problem and how to fix it.</p>
  
  <hr>
  
  <p>Finished with error: Gradle task assembleDebug failed with exit code 1</p>