title: "app:transformClassesWithMultidexlistForDebug" execution for this task whenever I try to run my Flutter app
body: <p>Whenever I try to run my App, it always fails and it gives this error</p>
  
  <blockquote>
    <ul>
    <li>What went wrong:
    Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
    com.android.build.api.transform.TransformException: Error while generating the main dex list.</li>
    </ul>
  </blockquote>
  
  <p>I have been trying to resolve for some days but none of the solutions work.</p>
  
  <p>I have tried to downgrade the versions of Firebase dependency, changed the minimum sdk version and many other things which were available on the Internet. Probably it is a version problem for the firebase dependency but I couldn't get a hold of that.</p>
  
  <p>This is my <strong>pubspec.yaml</strong> file</p>
  
  <pre><code>dependencies:
    flutter:
      sdk: flutter
  
    cupertino_icons: ^0.1.2
    url_launcher: ^4.0.2
    dio: any
    path_provider: any
    carousel_pro: ^0.0.13
    firebase_messaging: ^5.0.1
    sqflite: any
    #cloud_firestore: ^0.7.4
    firebase_database: ^3.0.0
    photo_view: ^0.2.2
    webview_flutter: ^0.3.4
    flutter_webview_plugin: ^0.3.5
  
  dev_dependencies:
    flutter_test:
      sdk: flutter
    flutter_launcher_icons: ^0.7.0
  
  </code></pre>
  
  <p>This is the <strong>app/build.gradle file</strong> in which some changes were to be made for the solution but which didn't work. I haven't added the complete file but just some parts which are essential.</p>
  
  <pre><code>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.technothlon.techno_app"
          minSdkVersion 16
          targetSdkVersion 28
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
          multiDexEnabled true
          testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
      }
  
  
  dependencies {
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.1.2-alpha02'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha02'
      implementation 'com.google.firebase:firebase-core:16.0.8'
      implementation 'com.google.firebase:firebase-messaging:17.3.3'
  
  }
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>My <strong>build.gradle</strong> file</p>
  
  <pre><code>
      dependencies {
          classpath 'com.android.tools.build:gradle:3.1.2'
          classpath 'com.google.gms:google-services:4.2.0'
      }
  </code></pre>
  
  <p>I have tried these workarounds:</p>
  
  <ol>
  <li><a href="https://github.com/flutter/flutter/issues/23929" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/23929</a></li>
  <li><a href="https://github.com/flutter/flutter/issues/23131" rel="nofollow noreferrer">https://github.com/flutter/flutter/issues/23131</a></li>
  </ol>
  
  <p>And some other solutions as well from Stack and Github but nothing helped me up. Personally I believe that the problem lies with the <strong>Firebase dependency version</strong> and its compatibililty with <strong>AndroidX</strong>.</p>
  
  <p>Screenshot of the error: <a href="https://ibb.co/G2sXnpx" rel="nofollow noreferrer">https://ibb.co/G2sXnpx</a></p>
  
  <p>It would be great if someone can help me on this because I couldn't get my head around this problem for over 5 days now :( .</p>