Android - setStatusBarColor() NoSuchMethodError exception
It needs to be
if (android.os.Build.VERSION.SDK_INT >= 21)
instead of
if (android.os.Build.VERSION.SDK_INT >= 19)
as setStatusBarColor()
was added in API level 21.
Edit : u can use like it :
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
//your code
}