revised R.attr from using switch to conditional if
compile now 21, build tools is 21.0.2