title: Cannot resolve class android.support.constraint.ConstraintLayout
body: <p>I am getting this line in red color</p>
  <pre><code>&lt;android.support.constraint.ConstraintLayout 
  </code></pre>
  <p>and app crashes on opening.
  it was working ok but now it gets an error: cannot resolve class <code>android.support.constraint.constraintlayout</code></p>
  <p>I also tried adding dependencies into the module Gradle file and also try fixing with suggested fixes by (add dependencies on androidx.constraints..,) link, but still no luck. I am new to this. Please help.</p>
  <p>Here is the all code of main activity:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      android:background=&quot;@drawable/background&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
  
      &lt;Button
          android:id=&quot;@+id/act1Btn&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginStart=&quot;8dp&quot;
          android:layout_marginLeft=&quot;8dp&quot;
          android:layout_marginTop=&quot;8dp&quot;
          android:layout_marginEnd=&quot;8dp&quot;
          android:layout_marginRight=&quot;8dp&quot;
          android:layout_marginBottom=&quot;8dp&quot;
          android:text=&quot;Bill Calculation&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/askOptions&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginStart=&quot;8dp&quot;
          android:layout_marginLeft=&quot;8dp&quot;
          android:layout_marginTop=&quot;8dp&quot;
          android:layout_marginEnd=&quot;8dp&quot;
          android:layout_marginRight=&quot;8dp&quot;
          android:layout_marginBottom=&quot;8dp&quot;
          android:text=&quot;What you want to do?&quot;
          android:textColor=&quot;#00BCD4&quot;
          android:textSize=&quot;30sp&quot;
          app:layout_constraintBottom_toTopOf=&quot;@+id/act1Btn&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  
      &lt;Button
          android:id=&quot;@+id/btn3&quot;
          android:layout_width=&quot;130dp&quot;
          android:layout_height=&quot;55dp&quot;
          android:layout_marginStart=&quot;8dp&quot;
          android:layout_marginLeft=&quot;8dp&quot;
          android:layout_marginEnd=&quot;8dp&quot;
          android:layout_marginRight=&quot;8dp&quot;
          android:layout_marginBottom=&quot;8dp&quot;
          android:text=&quot;Tax Calc&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/act1Btn&quot; /&gt;
  
      &lt;Button
          android:id=&quot;@+id/btn4&quot;
          android:layout_width=&quot;142dp&quot;
          android:layout_height=&quot;46dp&quot;
          android:text=&quot;Mobile Tax&quot;
          app:layout_constraintBottom_toTopOf=&quot;@+id/btn3&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/act1Btn&quot; /&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>