setAdapter not recognize in android studio : <p>I have a tutorial video, in Video teacher can use setAdapter as you see below Image, but in my code, android studio not Recognize it</p>

<p>image of teacher learning:
<a href="https://i.stack.imgur.com/4N59n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4N59n.png" alt="enter image description here"></a></p>

<p>and below is my code screenshot:
<a href="https://i.stack.imgur.com/ouuBr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ouuBr.png" alt="enter image description here"></a></p>
