스터디/Flutter+Dart

Flutter Android E8 에러 - ERROR:D8: cohttp://m.android.tools.r8.kotlin.H

Dalmangyi 2024. 12. 4.

Flutter Android Build 에러

ERROR:D8: cohttp://m.android.tools.r8.kotlin.H

ERROR:D8: com.android.tools.r8.kotlin.H 
ERROR:D8: com.android.tools.r8.kotlin.H 
ERROR:D8: com.android.tools.r8.kotlin.H 
ERROR:D8: com.android.tools.r8.kotlin.H 
ERROR:D8: com.android.tools.r8.kotlin.H 
ERROR:D8: com.android.tools.r8.kotlin.H 
ERROR:D8: com.android.tools.r8.kotlin.H


* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform library-2.5.1.aar (com.github.pedroSG94.RootEncoder:library:2.5.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/shseo/.gradle/caches/transforms-3/54bb62fcf16fe8da792d03c2b00b5406/transformed/jetified-library-2.5.1-runtime.jar.
         > Error while dexing.
   > Failed to transform extra-sources-2.5.1.aar (com.github.pedroSG94.RootEncoder:extra-sources:2.5.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/shseo/.gradle/caches/transforms-3/ad15f1b790f9d01f31e56a2b943de846/transformed/jetified-extra-sources-2.5.1-runtime.jar.
         > Error while dexing.
   > Failed to transform play-services-location-21.2.0.aar (com.google.android.gms:play-services-location:21.2.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/shseo/.gradle/caches/transforms-3/fd4f9c07edee7e80ac673d7202f51707/transformed/jetified-play-services-location-21.2.0-runtime.jar.
         > Error while dexing.
   > Failed to transform encoder-2.5.1.aar (com.github.pedroSG94.RootEncoder:encoder:2.5.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/shseo/.gradle/caches/transforms-3/0ce479d8adb0d8ff5bb76e4ca01d0d15/transformed/jetified-encoder-2.5.1-runtime.jar.
         > Error while dexing.
   > Failed to transform rtmp-2.5.1.aar (com.github.pedroSG94.RootEncoder:rtmp:2.5.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/shseo/.gradle/caches/transforms-3/c31ee601d87337eadc0355f01261fe61/transformed/jetified-rtmp-2.5.1-runtime.jar.
         > Error while dexing.

 

이런 에러가 뜰때, 

flutter sdk, java sdk, kotlin sdk, Gradle, Android Plugin 버전을 체크할게 아니고. 

Dex 단어를 힌트로 보고 

 

 

 

 

 

build.gradle쪽에 

buildTypes {
    release {  
    	...
        multiDexEnabled true
        minifyEnabled true
        shrinkResources true
        ...
    }

    debug {
		...
        multiDexEnabled true
        minifyEnabled true
        shrinkResources true
        ...
    }
}

이런식으로 multiDexEnabled와 minifyEnabled, shrinkResources를 true로 주면 됩니다.

 

 

 

댓글