import android.support.v4.content.ContextCompat fun Context.color(res: Int): Int = ContextCompat.getColor(this, res) // ^^ Works flawlessly // Build is not even highlighted by the IDE unlike Context import android.os.Build // Works if I do Build().isAboveL()? But why does it need a new Build, Context doesnt :/ public fun Build.isAboveL(): Boolean { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { return true } else { return false } } // This one doesnt work // Works if I do DateUtils().humanize(2L) import android.text.format.DateUtils fun DateUtils.humanize(e: Long): String{ return "humanized_time" } // This one Doesnt work either