java.lang.RuntimeException: Duplicate class org.intellij.lang.annotations.Flow found in modules annotations-16.0.1.jar and annotations-java5-15.0.jar

It's the Conflict between two jars. You can either figure out which one you are not using from Modules_annotation 16.XXX and annotations-java5-XXXX jar files.

I found out two ways to solve this.

  1. Excluding the JetBrains annotations module is a workaround; why is it in your project in the first place? Most likely, it got automatically added to your classpath by Android Studio when what you really wanted was Android's own annotations.

So, a better solution is to look for an org.jetbrains:annotations dependency in your build.gradle file[s], like this:

implementation 'org.jetbrains:annotations-java5:15.0'

...and remove it.

If 1 is not working

  1. Please add the following line in your App level build.gradle.
configurations {
             compile.exclude group: 'org.jetbrains' , module:'annotations'