3

why when I compile the project it works with no errors, but when I want to build the generated apk it gives me this error :

Error: This fragment inner class should be static [ValidFragment]

and how to fix it ?

YFeizi
  • 1,498
  • 3
  • 28
  • 50
R.John Fake
  • 55
  • 1
  • 5

1 Answers1

6

Thats lint error, you are probably building with gradle, to disable aborting on errors, add:

lintOptions {
    abortOnError false
}

to build.gradle, or better fix problem in code. For more on this particular error read here: Fragment inner class should be static

Community
  • 1
  • 1
marcinj
  • 48,511
  • 9
  • 79
  • 100