InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annota

Android studio升级到3.1.4以后,buildApk时出现了如下提示:

InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored.

截图如下:

InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annota_第1张图片

这个只能算是警告吧,也没报错,而且也能正常打出包来,但是我个人有点“偏执狂”,看着就是觉得不舒服,于是百度了一下,发现这是AS3.1.4的一个bug。应该后期升级到AS3.2就会解决这个bug了,解决办法也比较简单,在如下图所示的buildTypes里加几行代码就可以了:

InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annota_第2张图片

另外,我也把代码贴出来,方便大家复制:

   lintOptions {
                checkReleaseBuilds false
                abortOnError false
   }

如果本文对您有所帮助,麻烦点击一下右侧的点赞按钮,谢谢!

你可能感兴趣的:(gradle,安卓开发,lintOptions,InnerClass,annotations)