user2872856 user2872856 - 5 months ago 47
Android Question

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

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 error came out. How to ignore this error and generate the signed APK? I am using Android Studio for Mac.


Found the solution. The easier way is to add these to the gradle:

 android {
          lintOptions {
              checkReleaseBuilds false

Or another way is to add @SuppressLint("ValidFragment")