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
For me only worked the combination of the two previous answers:
android {
lintOptions {
disable 'ValidFragment'
checkReleaseBuilds false
}
}
But remember, these a bad patch to avoid lint warnings/errors, the solution is to adapt the Fragment constructor to a public static Fragment newInstance(params) Fragment constructor.