title: Error inflating class com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
body: <p>Although there is a similar question, it does not give me a solution. When I'm trying to use <code>com.google.android.material.floatingactionbutton.FloatingActionButton</code> it runs well. But if I try to use <code>com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton</code>, it gives errors. </p>
  
  <p>My code in the XML file:</p>
  
  <pre><code>&lt;com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
      android:id="@+id/book_profile_write_review"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginBottom="20dp"
      android:contentDescription="@string/author_name"
      android:text="@string/book_name"
      app:layout_constraintBottom_toBottomOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintHorizontal_bias="0.5"
      app:layout_constraintStart_toStartOf="parent"
      app:srcCompat="@drawable/ic_launcher_foreground" /&gt;
  </code></pre>
  
  <p>logcat:</p>
  
  <pre><code>2019-11-14 12:30:21.997 21326-21326/com.bookaholic.shahad.bookaholicbd E/AndroidRuntime: FATAL EXCEPTION: main
  Process: com.bookaholic.shahad.bookaholicbd, PID: 21326
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bookaholic.shahad.bookaholicbd/com.bookaholic.shahad.bookaholicbd.activities.BookProfile}: android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2974)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
      at android.app.ActivityThread.-wrap11(Unknown Source:0)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
      at android.os.Handler.dispatchMessage(Handler.java:106)
      at android.os.Looper.loop(Looper.java:164)
      at android.app.ActivityThread.main(ActivityThread.java:7000)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
   Caused by: android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
   Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
   Caused by: java.lang.reflect.InvocationTargetException
      at java.lang.reflect.Constructor.newInstance0(Native Method)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
      at android.view.LayoutInflater.createView(LayoutInflater.java:647)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
      at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
      at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
      at com.bookaholic.shahad.bookaholicbd.activities.BookProfile.onCreate(BookProfile.java:20)
      at android.app.Activity.performCreate(Activity.java:7258)
      at android.app.Activity.performCreate(Activity.java:7249)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1222)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3059)
      at android.app.ActivityThread.-wrap11(Unknown Source:0)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
      at android.os.Handler.dispatchMessage(Handler.java:106)
      at android.os.Looper.loop(Looper.java:164)
      at android.app.ActivityThread.main(ActivityThread.java:7000)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
   Caused by: java.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.MaterialComponents (or a descendant).
      at com.google.android.material.internal.ThemeEnforcement.checkTheme(ThemeEnforcement.java:243)
      at com.google.android.material.internal.ThemeEnforcement.checkMaterialTheme(ThemeEnforcement.java:217)
      at com.google.android.material.internal.ThemeEnforcement.checkCompatibleTheme(ThemeEnforcement.java:145)
      at com.google.android.material.internal.ThemeEnforcement.obtainStyledAttributes(ThemeEnforcement.java:76)
      at com.google.android.material.button.MaterialButton.&lt;init&gt;(MaterialButton.java:200)
  </code></pre>
  
  <p>Can you please help me?</p>