Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D8 dexing error using authn_android #180

Closed
thereallukesimpson opened this issue Aug 20, 2020 · 2 comments
Closed

D8 dexing error using authn_android #180

thereallukesimpson opened this issue Aug 20, 2020 · 2 comments

Comments

@thereallukesimpson
Copy link

In order to support Android 6 (SDK 23) for custom Okta login we have implemented the anthn_android library as described here: https://github.com/okta/okta-oidc-android/tree/authn_android

It appears to work for dev builds, even local local builds obfuscated with R8, but we get an error in CI/locally due to the following desugar tasks failing:

desugarDebugFileDependencies FAILED
desugarDebugAndroidTestFileDependencies FAILED

Note that these tasks also fail locally. Detailed stack trace below.

Here are details of our current configuration:

Android Studio 4.0.1
Android Gradle Plugin 4.0.1
Gradle Version 6.1.1

Note we have a multi-module app structure.

Please advise how we might be able to address this.

> Task :app:desugarDebugFileDependencies
D8: Merging dex file containing classes with prefix 'j$.' with classes with any other prefixes is not allowed.
Stack trace:
com.android.tools.r8.errors.a: Merging dex file containing classes with prefix 'j$.' with classes with any other prefixes is not allowed.
        at com.android.tools.r8.ir.conversion.O.a(:84)
        at com.android.tools.r8.ir.conversion.O.a(:53)
        at com.android.tools.r8.graph.C.b(:40)
        at com.android.tools.r8.ir.conversion.O.b(:35)
        at com.android.tools.r8.utils.U0.a(:10)
        at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
        at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
        at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
        at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:322)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:66)
        at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:36)
        at com.android.tools.r8.utils.U0.a(:3)
        at com.android.tools.r8.ir.conversion.O.a(:10)
        at com.android.tools.r8.D8.d(:29)
        at com.android.tools.r8.D8.b(:1)
        at com.android.tools.r8.utils.W.a(:30)
        at com.android.tools.r8.D8.run(:11)
        at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:116)
        at com.android.builder.dexing.DexArchiveBuilder.convert$default(DexArchiveBuilder.kt:46)
        at com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction.run(DexFileDependenciesTask.kt:153)
        at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:242)
        at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:50)
        at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:50)
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:63)
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:59)
        at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:98)
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:59)
        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.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
        at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
        at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
        at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:53)
        at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:200)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
        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:56)
        at java.base/java.lang.Thread.run(Thread.java:834)
        Suppressed: java.util.concurrent.ExecutionException: com.android.tools.r8.errors.a: Merging dex file containing classes with prefix 'j$.' with classes with any other prefixes is not allowed.
                at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:552)
                at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:513)
                at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:86)
                at com.android.tools.r8.utils.U0.a(:14)
                at com.android.tools.r8.utils.U0.a(:9)
                ... 39 more
        [CIRCULAR REFERENCE:com.android.tools.r8.errors.a: Merging dex file containing classes with prefix 'j$.' with classes with any other prefixes is not allowed.]


> Task :app:desugarDebugFileDependencies FAILED

@FeiChen-okta
Copy link
Contributor

Hi @thereallukesimpson I don't think you need to use that library anymore as Android Studio 4 with gradle plugin 4 supports desugaring and Java8 features https://developer.android.com/studio/write/java8-support

You can remove that library dependency since you are using Android Studio 4.0.1

@JayNewstrom
Copy link
Contributor

@thereallukesimpson we've made some documentation updates to the readmes for this. Please comment or reopen if you're still having this issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants