FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':app:mergeExtDexDebug'.

> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate

   > There was a failure while executing work items

      > A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction

         > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 

           The number of method references in a .dex file cannot exceed 64K.

           Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html


* 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 2m 34s

[!] App requires Multidex support

    Multidex support is required for your android app to build since the number of methods has exceeded 64k. See https://docs.flutter.dev/deployment/android#enabling-multidex-support for more information. You may pass the --no-multidex flag to skip Flutter's multidex support to use a manual solution.


    Flutter tool can add multidex support. The following file will be added by flutter:


        android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java


cannot prompt without a terminal ui

Error: Gradle task assembleDebug failed with exit code 1



위에 오류는 FLUTTER 안드로이드에서 나타날 수 있는 오류입니다. 
이건 무슨 오류일까요? 
해결 방법은 간단합니다.
ANDROID >> APP>> BUILD.GRADLE 단위에서 아래처럼 내용을추가해주면 됩니다.,

defaultConfig {targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true}


multiDexEnabled true <<< 이내용을 위에처럼 추가해주면 끝 문제 해결