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로 주면 됩니다.
'스터디 > Flutter+Dart' 카테고리의 다른 글
Flutter 자주쓰는 Package(패키지, library) 모음 (Favorite Package) - 작성중 (0) | 2022.09.14 |
---|---|
Flutter 설치 오류 : apk 설치실패, Error: ADB exited with exit code 1, Performing Streamed Install, INSTALL_FAILED_INSUFFICIENT_STORAGE (0) | 2022.09.02 |
Flutter/Dart Library의 충돌을 막아보자 (import, as, show, hide) (0) | 2022.08.31 |
Flutter/Dart 랜덤 (0) | 2022.08.30 |
Flutter APK 만들기 명령어 (debug, release) (0) | 2022.08.30 |
댓글