user2872856 user2872856 - 1 year ago 73
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.

Answer Source

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")

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download