Gradel build failed #5061
-
Operating Systemwindows 10 Android Studio Versionflamingo RAM size20gb Free disk space380 Which step are you stuck on?when i try to run app after some time it says gradel build fail. Error LogExecution failed for task ':utility:kaptGenerateStubsDebugKotlin'.
> Could not resolve all files for configuration ':utility:debugCompileClasspath'.
> Failed to transform model.jar (project :model) to match attributes {artifactType=android-classes, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=15, org.gradle.libraryelements=jar, org.gradle.usage=java-api}.
> Execution failed for JetifyTransform: C:\Users\Praful\StudioProjects\oppia-android\model\build\libs\model.jar.
> Failed to transform 'C:\Users\Praful\StudioProjects\oppia-android\model\build\libs\model.jar' using Jetifier. Reason: Unsupported class file major version 59. (Run with --stacktrace for more details.)
* 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 ':utility:kaptGenerateStubsDebugKotlin'.
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
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:200)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:411)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:398)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:391)
at o
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:96)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:52)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:83)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:54)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:88)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:88)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:46)
at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:34)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:43)
at org.gradle.api.internal.artifacts.transform.MutableTransformationWorkspaceServices$MutableTransformationWorkspaceProvider.withWorkspace(MutableTransformationWorkspaceServices.java:67)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:43)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:33)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:40)
at org.gradle.internal.execution.steps.IdentityCacheStep.lambda$executeDeferred$0(IdentityCacheStep.java:52)
at org.gradle.cache.Cache.lambda$get$0(Cache.java:31)
at org.gradle.cache.ManualEvictionInMemoryCache.get(ManualEvictionInMemoryCache.java:30)
at org.gradle.cache.Cache.get(Cache.java:31)
at org.gradle.internal.execution.steps.IdentityCacheStep.lambda$executeDeferred$1(IdentityCacheStep.java:50)
... 39 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:184)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:152)
at com.android.tools.build.jetifier.processor.transform.bytecode.ByteCodeTransformer.runTransform(ByteCodeTransformer.kt:35)
at com.android.tools.build.jetifier.processor.Processor.visit(Processor.kt:542)
at com.android.tools.build.jetifier.processor.archive.ArchiveFile.accept(ArchiveFile.kt:53)
at com.android.tools.build.jetifier.processor.Processor.visit(Processor.kt:524)
at com.android.tools.build.jetifier.processor.archive.Archive.accept(Archive.kt:77)
at com.android.tools.build.jetifier.processor.Processor.transformLibrary(Processor.kt:520)
at com.android.tools.build.jetifier.processor.Processor.transform2(Processor.kt:292)
at com.android.build.gradle.internal.dependency.JetifyTransform.transform(JetifyTransform.kt:129)
... 119 more
unsupported class file major version 59 Approaches already used to resolve the issueChanged to utf-8 Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 28 replies
-
@prafulbbandre This issue is related to our use of jetifier currently. I believe it will be resolved with the upcoming build platform changes, but to explain a bit: In gradle.properties, A fix would be to compile the JAR file with a lower version of Java. @InquisitiveCatherine can you please check using https://developer.android.com/studio/intro/studio-config#jdk. Edited to add: looks like you're using JDK 15--this isn't supported with our version of Gradle. You'll need to install JDK 8 LTS for it to work correctly (9 is fine too). |
Beta Was this translation helpful? Give feedback.
-
You can also check if your android studio jdk is properly set using these steps: https://developer.android.com/studio/intro/studio-config#jdk |
Beta Was this translation helpful? Give feedback.
-
@adhiamboperes @MohitGupta121 i am using java 8 but still getting the jetifer error |
Beta Was this translation helpful? Give feedback.
-
This issue has been fixed in #5162. Pulling If you are facing new build issues please start a new discussion. |
Beta Was this translation helpful? Give feedback.
Downgrading jdk to 11 was the solution for it.
Thanks @adhiamboperes