title: Could not use MaterialButtonToggleGroup though I can use MaterialButton?
body: <p>I want to achieve this look in my app:
  <img src="https://miro.medium.com/fit/c/1838/551/1*2ibQ49BwgYHffUo88qKQVg.png" alt="look"></p>
  
  <p>My xml code in the activity looks something like that:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;com.google.android.material.button.MaterialButtonToggleGroup
    android:id="@+id/toggleGroup"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"&gt;
  
    &lt;com.google.android.material.button.MaterialButton
      android:id="@+id/button1"
      ... /&gt;
  
    &lt;com.google.android.material.button.MaterialButton
      android:id="@+id/button2"
      ... /&gt;
  
    &lt;com.google.android.material.button.MaterialButton
      android:id="@+id/button3"
      ... /&gt;
  &lt;/com.google.android.material.button.MaterialButtonToggleGroup&gt;
  </code></pre>
  
  <p>I migrated to androidx, and used material components in my styles, but for some reason I get a runtime error that says: </p>
  
  <p><code>Binary XML file: Error inflating class com.google.android.material.button.MaterialButtonToggleGroup</code></p>
  
  <pre class="lang-java prettyprint-override"><code>implementation "com.google.android.material:material:1.0.0"
  </code></pre>
  
  <p>Though, When using <code>com.google.android.material.button.MaterialButton</code> without a group it would work perfectly fine, meaning that I'm using the right styling and gradle implementation.</p>
  
  <p>I tries also the following:</p>
  
  <ul>
  <li>invalidating cache</li>
  <li>removing and reimporting both <code>androidx.appcompat:appcompat:1.1.0</code> and <code>com.google.android.material:material:1.0.0</code> multiple times</li>
  <li>closing and reopening android studio</li>
  <li>reimporting the project after closing it</li>
  <li>pumping up minSdkVersion to be 21 instead of 14 (target and compile sdk versions are both 28)</li>
  </ul>
  
  <p>Here are my dependencies (In case some of them are causing some sort of confliction):</p>
  
  <pre class="lang-java prettyprint-override"><code>implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'androidx.appcompat:appcompat:1.1.0'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  
      implementation 'androidx.cardview:cardview:1.0.0'
  
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.2.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  
      //Room Persistance Library
      def room_version = "2.1.0"
      implementation "android.arch.persistence.room:runtime:$room_version"
      annotationProcessor "android.arch.persistence.room:compiler:$room_version"
      //Lifecycle Libraries from the Android Architecture Components
      def lifecyle_version = " 2.1.0"
      implementation "android.arch.lifecycle:extensions:$lifecyle_version"
      annotationProcessor "android.arch.lifecycle:compiler:$room_version"
  
      //External Libraries:
      implementation 'com.github.HITGIF:TextFieldBoxes:1.4.4'
      implementation "com.google.android.material:material:1.0.0"
  </code></pre>
  
  <p>Here is the style I'm using for that activity:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;style name="ThemeNewRoutine" parent="Theme.MaterialComponents.Light.NoActionBar"&gt;
          &lt;!-- Customize your theme here. --&gt;
          &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  
  <p>Here is the activity element in the manifest file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;activity
              android:name=".Views.NewRoutine.NewRoutineActivity"
              android:theme="@style/ThemeNewRoutine"&gt;
  
          &lt;/activity&gt;
  </code></pre>
  
  <p>How come com.google.android.material.button.MaterialButton is working perfectly fine BUT com.google.android.material.button.MaterialButtonToggleGroup isn't.</p>
  
  <p>Also, I found out that the following attributes also cannot be resolved when I use them in the style.xml file (even though the parent is Theme.MaterialComponents.Light):</p>
  
  <ul>
  <li>colorPrimaryVariant</li>
  <li>colorOnPrimary</li>
  <li>colorSecondaryVariant</li>
  <li>colorOnSecondary</li>
  <li>colorOnError</li>
  <li>colorSurface</li>
  <li>colorOnSurface</li>
  <li>colorOnBackground</li>
  </ul>
  
  <p>I don't know if that would cause any confliction but my activity extends AppCompatActivity:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class NewRoutineActivity extends AppCompatActivity
  </code></pre>