When I add the following code to the layout.xml file, the app crashes, when the layout is loaded.
Code:
<android.support.design.button.MaterialButton
android:id="@+id/b_p_add"
android:layout_width="143dp"
android:layout_height="38dp"
android:layout_below="@+id/et_p_addl_notes"
android:layout_centerHorizontal="true"
android:layout_marginTop="43dp" />
I checked my app gradle file and found
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
So, the required design, support, appcompat dependencies are present.
Note: No other code apart from the above has been added, i.e, the app works fine if I don't add the Material button in XML and crashes, if I add the Material Button in the XML.