Error: Program type already present: com.google.zxing.BarcodeFormat

오류 정보:
Error: Program type already present: com.google.zxing.BarcodeFormat

Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\0.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\1.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\2.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\3.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\4.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\5.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\6.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\7.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\8.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\9.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\10.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\11.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\12.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\13.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\14.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\15.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\16.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\17.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\18.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\19.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\20.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\21.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\22.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\23.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\24.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\25.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\26.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\27.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\28.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\29.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\30.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\31.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\32.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\33.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\34.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\35.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\36.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\37.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\38.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\39.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\40.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\41.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\42.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\43.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\44.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\45.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\46.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\47.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\48.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\49.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\50.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\51.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\52.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\53.jar
Program type already present: com.google.zxing.BarcodeFormat
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
	at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
	at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230)
	at sun.reflect.GeneratedMethodAccessor684.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
	at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
	... 108 more
Caused by: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\0.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\1.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\2.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\3.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\4.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\5.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\6.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\7.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\8.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\9.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\10.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\11.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\12.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\13.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\14.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\15.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\16.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\17.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\18.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\19.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\20.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\21.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\22.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\23.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\24.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\25.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\26.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\27.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\28.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\29.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\30.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\31.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\32.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\33.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\34.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\35.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\36.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\37.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\38.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\39.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\40.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\41.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\42.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\43.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\44.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\45.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\46.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\47.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\48.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\49.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\50.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\51.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\52.jar, H:\AndroidstudioProjects\LovePet\app\build\intermediates\transforms\dexBuilder\debug\53.jar
Program type already present: com.google.zxing.BarcodeFormat
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
	at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
	at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
	at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:101)
	at com.android.build.gradle.internal.transforms.ExternalLibsMergerTransform.transform(ExternalLibsMergerTransform.kt:122)
	at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239)
	at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
	... 123 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
	at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:65)
	at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:43)
	at com.android.tools.r8.D8.run(D8.java:90)
	at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:115)
	... 128 more
Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: com.google.zxing.BarcodeFormat
	at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:116)
	at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:74)
	at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:59)
	... 131 more


 
해결 방법:
  Multiple dex files define Lcom/google/zxing/BarcodeFormat
Error: Program type already present: com.google.zxing.Barcode Format, 이 부분은 당신의 zxing 라이브러리에 문제가 생겼다는 것입니다. 일반적으로 Unable to execute dex는 중복 패키지 도입으로 인해 발생한 것입니다. zxing 라이브러리라는 개념은 잘 모르겠습니다. 다음은 매우 지긋지긋한 프로그래머입니다. 마이크로 블로그 이름@이정양에게 감사드립니다. 그는 저에게 이 zxing 라이브러리를 지도해 주었습니다.
당신의libs 폴더 아래에 중복된 가방이 있을 것입니다. 중복이 아닙니다. (저는 처음에 중복된 가방이 중명이라고 생각했습니다) 여기는 두 개의 코어 가방입니다. 하나는 코어입니다.jar, 하나는 코어입니다.3.1.0.jar, 이 두 개는 모두 zxing 라이브러리입니다. 그 중 하나를 삭제하고 clean을 삭제합니다. 안 되면 다른 것을 삭제합니다.
일찍이 나는buildpath 안의 도입이 중복된 줄 알았다.나는order and export에 있는 Android private libary와 Android Dpendencies라는 두 개의 가방을 제거했는데 뜻밖에도 번역에 성공했지만 실행은 번쩍번쩍했다. 이것은 매우 큰 오점이다. 비록 나는 왜 이런 상황이 발생했는지 모르겠지만, 대신이 나의 글을 보고 나에게 답을 해 주기를 바란다.
또한 Unable to execute dex가 나타나는 것은 당신의 의존 패키지에 문제가 생길 수도 있습니다. 프로젝트를 도입할 때 세심합니다.

좋은 웹페이지 즐겨찾기