Flutter multidex handling is disabled 오류 해결하기

이윤진·2022년 7월 22일
0

플러터에서 firebase를 연결하는 과정에서 해당 에러가 발생하였다.

이럴 때는 android/app/build.gradle 문서에서 2가지를 바꿔주면 해결할 수 있다.

  1. multiDexEnabled true 추가하기
defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.unibuddy"
        // You can update the following values to match your application needs.
        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
        minSdkVersion 19
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true // <-- 이 부분 추가
    }
  1. implementation "com.android.support:multidex:1.0.3" 추가하기
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "com.android.support:multidex:1.0.3"
}
profile
Android/Flutter 개발

0개의 댓글