The Resources.getColor(int id) method has been deprecated.
Resources.getColor(int id)
@ColorInt @Deprecated public int getColor(@ColorRes int id) throws NotFoundException
In Android Marshmallow many methods are deprecated.
For example, to get color use
ContextCompat.getColor(context, R.color.color_name);
Also to get drawable use
ContextCompat.getDrawable(context, R.drawable.drawble_name);