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