user2872856 user2872856 - 25 days ago 7
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 1.2.1.1 for Mac.

Answer

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

Comments