在集成jetpack相关框架之后,突然报出:Type org.jetbrains.annotations.NotNull is defined multiple times:这个错误,在主工程APP的build.gradle文件的android{}添加一段代码即可:
android{
configurations { cleanedAnnotations implementation.exclude group: 'org.jetbrains', module: 'annotations' implementation.exclude group: 'com.intellij', module: 'annotations' }
}
注意不管是在哪个模块报错,请在主工程添加而不是其他工程模块的build文件.