Android studio warning - InnerClass annotations are missing corresponding EnclosingMember annotations

后端 未结 2 1691
半阙折子戏
半阙折子戏 2020-12-25 11:51

I recently upgraded to Android Studio 3.1 and upon building my Kotlin with Java project I got the following warning.

InnerClass annotations are missing c

相关标签:
2条回答
  • 2020-12-25 12:31

    To fix the issue temporarily, I am adding this:

    buildTypes {
        release {
            lintOptions {
                checkReleaseBuilds false
                abortOnError false
            }
        }
    }
    

    Will update if I find a permanent fix. This page for configuring JUnit 5 may also help

    0 讨论(0)
  • 2020-12-25 12:36

    It may because some annotations be confused, so just add proguard rule:

    -keepattributes *Annotation*
    -keep @**annotation** class * {*;}

    it worked fine to me.

    0 讨论(0)
提交回复
热议问题