Fragment inner class should be static

后端 未结 5 2109
说谎
说谎 2020-11-29 20:47

I have a FragmentActivity class with inner class that should display Dialog. But I am required to make it static. Eclipse offers me to

5条回答
  •  星月不相逢
    2020-11-29 21:33

    If u develop it in android studio then no problem if you not give it as static.The project will run without any errors and at the time of generation of apk you will get Error :This fragment inner class should be static [ValidFragment]

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

    lintOptions {
        abortOnError false
    }
    

    to build.gradle.`

提交回复
热议问题