If you set the targetSdk to 29+ the colorPrimary will not be applyed. This can be observed in the Java Demo provided, if you change the targetSdk to 29+, the ToolBar will not change its color