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

对着背影说爱祢 提交于 2019-11-28 10:46:09

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

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

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.

Kirill Vashilo

Program type already present:

org.intellij.lang.annotations.JdkConstants$PatternFlags

Learn how to resolve the issue at: https://developer.android.com/studio/build/dependencies#duplicate_classes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!