Search code examples
javaandroidandroid-studiokotlinkotlin-extension

Kotlin Extensions - Inflate Custom Views


I'm new to kotlin, I Have an adapter class and I need to inflate a view. but recently I'm facing an error saying "Unresolved reference: R"

Like in the image below :

enter image description here

So, how can I inflate this view? I have imported the following:

import kotlinx.android.synthetic.main.slide_layout.view.*

But I can't figure out what should i do next, I searched everywhere, but they all seem outdated! so what should i do? Thank you!


Solution

  • Unfortunately not all answers here can solve your problem, I've been looking for general solutions, you can find them Here