'Android Studio: An exception has occurred in the compiler (1.8.0_152-release)

While running app, unable to complete compilation. Keep throwing error.

I am using dagger2 library for annotation.

Error:15:04:36.466 [ERROR] [system.err] An exception has occurred in the compiler (1.8.0_152-release). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you. 15:04:36.466 [ERROR] [system.err] java.lang.NullPointerException 15:04:36.466 [ERROR] [system.err] at com.sun.tools.javac.comp.Check$1AnnotationValidator.visitAnnotation(Check.java:2657) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:2317) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.tree.TreeScanner.visitAnnotation(TreeScanner.java:320) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Check$1AnnotationValidator.visitAnnotation(Check.java:2658) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:2317) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Check.validateAnnotationTree(Check.java:2663) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Check.validateAnnotation(Check.java:2730) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Check.validateAnnotations(Check.java:2717) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.MemberEnter$6.run(MemberEnter.java:891) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:155) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Enter.complete(Enter.java:512) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.comp.Enter.main(Enter.java:471) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857) 15:04:36.467 [ERROR] [system.err] at com.sun.tools.javac.main.Main.compile(Main.java:523) 15:04:36.468 [ERROR] [system.err] at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) 15:04:36.468 [ERROR] [system.err] at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) 15:04:36.468 [ERROR] [system.err] at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:49) 15:04:36.468 [ERROR] [system.err] at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36) 15:04:36.468 [ERROR] [system.err] at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99) 15:04:36.468 [ERROR] [system.err] at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52) 15:04:36.468 [ERROR] [system.err] at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37) 15:04:36.468 [ERROR] [system.err] at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35) 15:04:36.468 [ERROR] [system.err] at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25) 15:04:36.469 [ERROR] [system.err] at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:198) 15:04:36.469 [ERROR] [system.err] at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:183) 15:04:36.469 [ERROR] [system.err] at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:120) 15:04:36.469 [ERROR] [system.err] at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:95) 15:04:36.469 [ERROR] [system.err] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 15:04:36.476 [ERROR] [system.err] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 15:04:36.476 [ERROR] [system.err] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 15:04:36.476 [ERROR] [system.err] at java.lang.reflect.Method.invoke(Method.java:498) 15:04:36.476 [ERROR] [system.err] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) 15:04:36.476 [ERROR] [system.err] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173) 15:04:36.476 [ERROR] [system.err] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134) 15:04:36.476 [ERROR] [system.err] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121) 15:04:36.476 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122) 15:04:36.487 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 15:04:36.487 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 15:04:36.487 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) 15:04:36.487 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) 15:04:36.487 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111) 15:04:36.487 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) 15:04:36.487 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 15:04:36.497 [ERROR] [system.err] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) 15:04:36.497 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) 15:04:36.497 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 15:04:36.497 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 15:04:36.498 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) 15:04:36.526 [ERROR] [system.err] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) 15:04:36.527 [ERROR] [system.err] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99) 15:04:36.527 [ERROR] [system.err] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) 15:04:36.527 [ERROR] [system.err] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) 15:04:36.527 [ERROR] [system.err] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 15:04:36.527 [ERROR] [system.err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 15:04:36.527 [ERROR] [system.err] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) 15:04:36.527 [ERROR] [system.err] at java.lang.Thread.run(Thread.java:745) 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:compileDebugJavaWithJavac'. 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Compilation failed; see the compiler error output for details. 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is: 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'. 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) 15:04:36.815 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) 15:04:36.816 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details. 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:51) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:198) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:183) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:120) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:95) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122) 15:04:36.817 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197) 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107) 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111) 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ... 27 more 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org 15:04:36.818 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 15:04:36.819 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 5s



Solution 1:[1]

I had a similar java compilation issue with version (1.8.0_152-release) but mine dealt with assertion errors on Lambda method conversions. Reverting to java version 1.7 for compilation worked for me. You can update the Target / Source compatibility in the (Module) build.gradle like so,

compileOptions {
    sourceCompatibility = 1.7
    targetCompatibility = 1.7
}

OR by clicking on your File tab on android studio --> then Project Structure and find 1.7 under the Source / Target Compatibility drop-down menu

enter image description here

Solution 2:[2]

android {
    compileSdkVersion 30
}

Solution 3:[3]

I met the same issue and my solution is changing jvmTarget to Java 11

  android {
    kotlinOptions {
        //jvmTarget = '1.8'
        jvmTarget = JavaVersion.VERSION_11
    }
  }    

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 cigien
Solution 3 galian