使用已存在的程序类型构建失败:android.net.http.SslCertificate

时间:2018-04-13 14:02:34

标签: android

我的构建失败,出现以下堆栈跟踪。我一直在寻找这个超过两个小时,但无济于事。任何人都可以建议这个错误是什么或者它为什么会发生?

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

* Try:
Run with --info or --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:transformClassesWithMultidexlistForDebug'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    ...
Caused by: com.android.build.api.transform.TransformException: Error while generating the main dex list.
    at com.android.build.gradle.internal.transforms.D8MainDexListTransform.transform(D8MainDexListTransform.kt:127)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:221)
    at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:217)
    at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
    ... 41 more
Caused by: com.android.builder.multidex.D8MainDexList$MainDexListException: com.android.tools.r8.errors.CompilationError: Program type already present: android.net.http.SslCertificate
    at com.android.builder.multidex.D8MainDexList.generate(D8MainDexList.java:87)
    at com.android.build.gradle.internal.transforms.D8MainDexListTransform.transform(D8MainDexListTransform.kt:114)
    ... 44 more
Caused by: com.android.tools.r8.errors.CompilationError: Program type already present: android.net.http.SslCertificate
    at com.android.tools.r8.utils.ProgramClassCollection.resolveClassConflictImpl(ProgramClassCollection.java:64)
    at com.android.tools.r8.utils.ProgramClassCollection.lambda$create$0(ProgramClassCollection.java:25)
    at com.android.tools.r8.utils.ProgramClassCollection.create(ProgramClassCollection.java:24)
    at com.android.tools.r8.graph.LazyLoadedDexApplication$Builder.build(LazyLoadedDexApplication.java:121)
    at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:122)
    at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:86)
    at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:36)
    at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:95)
    at com.android.builder.multidex.D8MainDexList.generate(D8MainDexList.java:83)
    ... 45 more

0 个答案:

没有答案