Android Fragment should be static's mistake to ask the boss to click is already mad!

in practice, follow the br that the book knocks out step by step.
call the replace method here to create an anonymous inner class. Ide has this error.
this method is contained in the following class

.
    class MyOnCheckedChangListener implements RadioGroup.OnCheckedChangeListener {

1. Try to change the class to static unsolvable
2. Redefining a public static inheritance fragment class to extract the above code snippet into the class also fails to report an error

log error:

     Caused by: java.lang.IllegalStateException: Fragment com.test.yu.player.activity.MainActivity.MyFragment must be a public static class to be  properly recreated from instance state.

just updated studio and got tired.

studio 3.3 android sdk 2.6 gradle 4.4


solves the problem of creating a new class in which an internal static class inherits Fragment
seems a bit silly, but the problem is solved


are you getting it a little wrong? no, no, no.


ask me the same question: how did you solve it?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9df34-2f3b7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9df34-2f3b7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?