본문 바로가기
Mobile

[ Ionic ] app:transformDexArchiveWithExternalLibsDexMergerForDebug' build 오류

by 기저귀찬개발자 2020. 7. 23.
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
34 actionable tasks: 32 executed, 2 up-to-date
D8: Program type already present: android.support.v4.app.INotificationSideChannel

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> 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.
  Program type already present: android.support.v4.app.INotificationSideChannel

* 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 6s
/home/jude/joo/03.exam/ionic/mountain/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D8: Program type already present: android.support.v4.app.INotificationSideChannel

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> 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.
  Program type already present: android.support.v4.app.INotificationSideChannel

* 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

QR스캐너를 사용하기 위해서 설치 중에 아래와 같은 오류가 생겼다.

스캐너 패키지 중에 android.support.v4 버전에 충돌이 있어서 생긴 오류라는데 정확히는 찾지 못했고 아래와 같은 해결법으로

해결 되었다. 

 

ionic cordova plugin add cordova-plugin-androidx
ionic cordova plugin add cordova-plugin-androidx-adapter

#rm -r andorid plugin간에 충돌이 날수도 있으므로 지우고 새로 하는 편이 좋다. 
ionic cordova build android

댓글