title: App requires Multidex support in flutter?
body: <p>I'm getting this error while building my app in Flutter. it seems the problem that the multidex is not enabled even though I did everything needed to enable it. this the error</p>
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:mergeProjectDexDebug'.
  &gt; A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
     &gt; com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
       Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
       Type androidx.activity.R$attr is defined multiple times: C:\Users\Abdul rehman\OneDrive\Desktop\CSC451\Capstone Project\harfanah\build\app\intermediates\project_dex_archive\debug\out\4b5c628c7fbb96e2839e63f71f8803802c039de25c33dd9c9475187dc45e6e1a_1.jar:classes.dex, C:\Users\Abdul rehman\OneDrive\Desktop\CSC451\Capstone Project\harfanah\build\app\intermediates\project_dex_archive\debug\out\9bd7ed05083b8d3edbf142363966d832d9f0694faefda4d175e3ad8ad18fc06d_1.jar:classes.dex
  
  * 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.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 30s
  [!] App requires Multidex support
      Flutter multidex handling is disabled. If you wish to let the tool configure multidex, use the --mutidex flag.
  Exception: Gradle task assembleDebug failed with exit code 1
  Exited (sigterm)
  </code></pre>
  <p>I have already checked all of the solutions.
  enabled Multidex support and used the latest version:</p>
  <pre><code>    defaultConfig {
          // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
          applicationId &quot;com.harfanahApplication.harfanah&quot;
          minSdkVersion 21
          targetSdkVersion 32
          versionCode flutterVersionCode.toInteger()
          versionName flutterVersionName
          multiDexEnabled true
      }
  .
  .
  .
  
  dependencies {
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&quot;
      implementation(&quot;androidx.multidex:multidex:2.0.1&quot;)
  }
  </code></pre>
  <p>I also added these to gradle.properies</p>
  <pre><code>org.gradle.jvmargs=-Xmx1536M
  android.useAndroidX=true
  android.enableJetifier=true
  </code></pre>
  <p>Still it is not working. any suggestions?</p>