liuxing
liuxing
  • 发布:2023-02-15 15:21
  • 更新:2023-02-15 15:21
  • 阅读:276

原生插件自定义基座打包失败

分类:uni-app

Appid: UNI0146D90
ERROR:[PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex: D8: Type com.staffInfo.uniapp.BuildConfig is defined multiple times: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex, [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/7642017922f209ba3f7ea8cf91319ac51fe8dd5e635921aacb495773dfd84d61_2.jar:classes.dex
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.
Type com.staffInfo.uniapp.BuildConfig is defined multiple times: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex, [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/7642017922f209ba3f7ea8cf91319ac51fe8dd5e635921aacb495773dfd84d61_2.jar:classes.dex
at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:128)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:115)
at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:111)
at com.android.build.gradle.internal.tasks.DexMergingWorkAction.merge(DexMergingTask.kt:805)
at com.android.build.gradle.internal.tasks.DexMergingWorkAction.run(DexMergingTask.kt:760)
at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59)
at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:206)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:214)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex
at Version.fakeStackEntry(Version_2.2.64.java:0)
at com.android.tools.r8.utils.a0.a(SourceFile:89)
at com.android.tools.r8.D8.run(D8.java:11)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:113)
... 34 more
Caused by: com.android.tools.r8.utils.b: Type com.staffInfo.uniapp.BuildConfig is defined multiple times: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex, [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/7642017922f209ba3f7ea8cf91319ac51fe8dd5e635921aacb495773dfd84d61_2.jar:classes.dex
at com.android.tools.r8.utils.V0.a(SourceFile:22)
at com.android.tools.r8.utils.V0.a(SourceFile:25)
at com.android.tools.r8.utils.T0.b(SourceFile:6)
at com.android.tools.r8.utils.T0.a(SourceFile:24)
at com.android.tools.r8.utils.T0.a(SourceFile:10)
at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048)
at com.android.tools.r8.utils.T0.a(SourceFile:6)
at com.android.tools.r8.graph.i1$c.e(SourceFile:3)
at com.android.tools.r8.dex.a.a(SourceFile:336)
at com.android.tools.r8.dex.a.a(SourceFile:265)
at com.android.tools.r8.D8.a(D8.java:22)
at com.android.tools.r8.D8.d(D8.java:6)
at com.android.tools.r8.D8.b(D8.java:1)
at com.android.tools.r8.utils.a0.a(SourceFile:47)
... 36 moreFAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDexRelease'.

    A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
    There was a failure while executing work items
    A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
    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.
    Type com.staffInfo.uniapp.BuildConfig is defined multiple times: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex, [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/7642017922f209ba3f7ea8cf91319ac51fe8dd5e635921aacb495773dfd84d61_2.jar:classes.dex

  • Try:

    Run with --debug option to get more log output.
    Run with --scan to get full insights.

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDexRelease'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:145)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:143)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:131)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:402)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:389)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:382)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:368)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
    Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
    at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:208)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:214)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
    at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
    Caused by: org.gradle.workers.WorkerExecutionException: There was a failure while executing work items
    at org.gradle.workers.internal.DefaultWorkerExecutor.workerExecutionException(DefaultWorkerExecutor.java:270)
    at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:252)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:72)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
    at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59)
    at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:206)
    ... 6 more
    Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
    at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:342)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:142)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:90)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForAll(DefaultAsyncWorkTracker.java:80)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForCompletion(DefaultAsyncWorkTracker.java:68)
    at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:250)
    ... 20 more
    Caused by: com.android.build.api.transform.TransformException: 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.
    Type com.staffInfo.uniapp.BuildConfig is defined multiple times: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex, [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/7642017922f209ba3f7ea8cf91319ac51fe8dd5e635921aacb495773dfd84d61_2.jar:classes.dex
    at com.android.build.gradle.internal.tasks.DexMergingWorkAction.merge(DexMergingTask.kt:810)
    at com.android.build.gradle.internal.tasks.DexMergingWorkAction.run(DexMergingTask.kt:760)
    at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62)
    at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
    at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62)
    ... 19 more
    Caused by: 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.
    Type com.staffInfo.uniapp.BuildConfig is defined multiple times: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex, [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/7642017922f209ba3f7ea8cf91319ac51fe8dd5e635921aacb495773dfd84d61_2.jar:classes.dex
    at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:128)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:115)
    at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:111)
    at com.android.build.gradle.internal.tasks.DexMergingWorkAction.merge(DexMergingTask.kt:805)
    ... 26 more
    Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex
    at Version.fakeStackEntry(Version_2.2.64.java:0)
    at com.android.tools.r8.utils.a0.a(SourceFile:89)
    at com.android.tools.r8.D8.run(D8.java:11)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:113)
    ... 28 more
    Caused by: com.android.tools.r8.utils.b: Type com.staffInfo.uniapp.BuildConfig is defined multiple times: [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/com/staffInfo/uniapp/BuildConfig.dex, [PackagePath]/app/build/intermediates/mixed_scope_dex_archive/release/out/7642017922f209ba3f7ea8cf91319ac51fe8dd5e635921aacb495773dfd84d61_2.jar:classes.dex
    at com.android.tools.r8.utils.V0.a(SourceFile:22)
    at com.android.tools.r8.utils.V0.a(SourceFile:25)
    at com.android.tools.r8.utils.T0.b(SourceFile:6)
    at com.android.tools.r8.utils.T0.a(SourceFile:24)
    at com.android.tools.r8.utils.T0.a(SourceFile:10)
    at com.android.tools.r8.utils.T0.a(SourceFile:6)
    at com.android.tools.r8.graph.i1$c.e(SourceFile:3)
    at com.android.tools.r8.dex.a.a(SourceFile:336)
    at com.android.tools.r8.dex.a.a(SourceFile:265)
    at com.android.tools.r8.D8.a(D8.java:22)
    at com.android.tools.r8.D8.d(D8.java:6)
    at com.android.tools.r8.D8.b(D8.java:1)
    at com.android.tools.r8.utils.a0.a(SourceFile:47)
    ... 30 more* Get more help at https://help.gradle.org

BUILD FAILED in 1m 34s
gradle build error: 1

2023-02-15 15:21 负责人:无 分享
已邀请:

要回复问题请先登录注册