I am stuck at this issue now with AS Ladybug 2.1.
I did extensive search and did not find a solution. Some poster got rid of this issue but none worked in my case. And a few posted that the button does not have to be MaterialButton.
Here is the error message I had:
FAILURE: Build failed with an exception.
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction Android resource linking failed com.bignerdranch.android.geoquiz.app-mergeDebugResources-43:/layout/activity_main.xml:49: error: attribute iconGravity (aka com.bignerdranch.android.geoquiz:iconGravity) not found. error: failed linking file resources.
Android resource linking failed com.bignerdranch.android.geoquiz.app-mergeDebugResources-43:/layout/activity_main.xml:49: error: attribute iconGravity (aka com.bignerdranch.android.geoquiz:iconGravity) not found. error: failed linking file resources.