How to ignore the “avoid non-default constructors in fragments” error?

后端 未结 4 954
执笔经年
执笔经年 2021-02-03 23:23

I got this error while trying to generate the signed APK. The thing is, my app is able to run and debug normally on my device. I don\'t know why when I try to generate APK, this

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-03 23:55

    turning off lint completely is not a decent solution if you still want to use the advantages of it. If anyone comes across this, I find turning off the specific error only a more elegant solution:

    android {
        lintOptions {
            disable 'ValidFragment'
        }
    }
    

提交回复
热议问题