Upgrade gradle build. Remove redundant code.

Also changed an attribute name because it conflicts with AppCompate (textAllCaps). Must find a better way to avoid the conflict.