Program type already present: org.intellij.lang.annotations.Flow

Please add following line in your App level build.gradle.

configurations {
    cleanedAnnotations
    compile.exclude group: 'org.jetbrains' , module:'annotations'
}

For me, it was just a glitch - "Clean project" helped.


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.