Unresolved Reference getResources() Kotlin
So I am trying to access the getResources() in my code, but for some reason it keeps getting an unresolved reference. I am doing this in another class for my array adapter. Is it because I don't have a main method or is it because of other reasons? I am bit new to android dev and kotlin in general so any help would be appreciate it.
class ForecastAdapter(val forecast: Forecast) : RecyclerView.Adapter(){
override fun getItemCount(): Int {
return forecast.list.count()
}...