Search code examples
android-radiogroup

Got error when use RadioGroup


I don't know how to fix the error in the images below:

Example 1

Example 2


Solution

  • I think you didn't imported 'OnCheckedChangeListener' in your class. Just keep
    import android.widget.RadioGroup.OnCheckedChangeListener; in your imports.