Sealed classes are not supported as program classes
developer-- opened this issue ยท 2 comments
developer-- commented
โ๏ธ Describe the bug
๐ฃ Steps to reproduce
- use version 4.0.0-SNAPSHOT
- build project
- See error
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:140)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:117)
at com.android.build.gradle.internal.dependency.BaseDexingTransform.process(DexingTransform.kt:294)
at com.android.build.gradle.internal.dependency.BaseDexingTransform.processNonIncrementally(DexingTransform.kt:241)
at com.android.build.gradle.internal.dependency.BaseDexingTransform.doTransform(DexingTransform.kt:151)
at com.android.build.gradle.internal.dependency.BaseDexingTransform.transform(DexingTransform.kt:109)
at org.gradle.api.internal.artifacts.transform.DefaultTransformer.transform(DefaultTransformer.java:264)
at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvocationFactory$AbstractTransformerExecution$1.call(DefaultTransformerInvocationFactory.java:296)
at org.gradle.api.internal.artifacts.transform.DefaultTransformerInvocationFactory$AbstractTransformerExecution$1.call(DefaultTransformerInvocationFactory.java:291)
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.artifacts.transform.DefaultTransformerInvocationFactory$AbstractTransformerExecution.execute(DefaultTransformerInvocationFactory.java:291)
at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:89)
at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:40)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
....
Caused by: com.android.tools.r8.internal.Jc: Sealed classes are not supported as program classes
at com.android.tools.r8.graph.r2.c(R8_3.3.83_3e328a3bbd0c840823c96123eb0f6192f0adf17b30ae46f695be39af0bc3505e:4)
at com.android.tools.r8.internal.Ra.a(R8_3.3.83_3e328a3bbd0c840823c96123eb0f6192f0adf17b30ae46f695be39af0bc3505e:349)
at com.android.tools.r8.graph.u2.a(R8_3.3.83_3e328a3bbd0c840823c96123eb0f6192f0adf17b30ae46f695be39af0bc3505e:42)
at com.android.tools.r8.internal.Hj.a(R8_3.3.83_3e328a3bbd0c840823c96123eb0f6192f0adf17b30ae46f695be39af0bc3505e:101)
at com.android.tools.r8.internal.Hj.a(R8_3.3.83_3e328a3bbd0c840823c96123eb0f6192f0adf17b30ae46f695be39af0bc3505e:102)
at com.android.tools.r8.internal.Hj.a(R8_3.3.83_3e328a3bbd0c840823c96123eb0f6192f0adf17b30ae46f695be39af0bc3505e:100)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/jmgebrishvili/.gradle/caches/transforms-3/308b5466e1638199f89145891bdb915a/transformed/library-4.0.0-SNAPSHOT-runtime.jar:com/chuckerteam/chucker/internal/ui/transaction/ProtocolResources.class
...
com.chuckerteam.chucker.api.ChuckerInterceptor chuckerInterceptor) {
^
bad class file: /Users/jmgebrishvili/.gradle/caches/transforms-3/5e37260d06290e7e7e2896dc20cdd12f/transformed/library-4.0.0-SNAPSHOT-api.jar(/com/chuckerteam/chucker/api/ChuckerInterceptor.class)
class file has wrong version 61.0, should be 55.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
๐ง Expected behavior
๐ท Screenshots
- OS: MacOS
- Chucker version: 4.0.0-SNAPSHOT
๐ Additional context
cortinico commented
- use version 4.0.0-SNAPSHOT
As a workaround, you need to be on AGP 8.0 and JDK 17 to use the latest SNAPSHOT.
I will look into finding a better fix for this.