Class or interface expected


I use android studio for writing this program.
In defining button ,line private Button mTrueButton; or private Button mFalseButton; gives an error : class or interface expected.
I added import android.widget.Button; manually also auto import have not any suggestion.
where is the problem?


There isn’t a problem with what you’ve given so far, have you gone a bit further in the chapter to see if it fixes itself with further code?


There might be an error in the previous code. I’ve noticed that forgetting a ; or closing brackets can cause the following code to not work properly. (such as hitting alt + enter to auto import classes) Maybe check your previous code or post it here for some help so we can see if there is anything else that might be causing this issue.