title: "Cannot resolve class android.support.v4.widget.DrawerLayout" even after adding dependencies in gradle
body: <p>I keep getting the <code>Cannot resolve class android.support.v4.widget.DrawerLayout</code> error even after adding both the DrawerLayout <code>androidx.drawerlayout:drawerlayout:1.1.1</code> and Material <code>com.google.android.material:material:1.0.0</code> implementations in my build.gradle file.</p>
  <p>I have tried adding other implementations, such as <code>com.android.support:support-compat:28.0.0</code> and <code>com.android.support:design:25.0.0</code>, but the error remains and the app won't start.</p>
  <p>Any idea on how to fix this?</p>
  <p>build.gradle:</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 30
      buildToolsVersion &quot;30.0.2&quot;
  
      defaultConfig {
          applicationId &quot;edu.ktu.birthdaycalendar&quot;
          minSdkVersion 21
          targetSdkVersion 30
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
  
          javaCompileOptions {
              annotationProcessorOptions {
                  arguments = [&quot;room.schemaLocation&quot;: &quot;$projectDir/schemas&quot;.toString()]
              }
          }
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  
  }
  
  dependencies {
      implementation fileTree(dir: &quot;libs&quot;, include: [&quot;*.jar&quot;])
      implementation 'androidx.appcompat:appcompat:1.1.0'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'org.jetbrains:annotations-java5:15.0'
      implementation 'androidx.recyclerview:recyclerview:1.1.0'
      implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test.ext:junit:1.1.1'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  
      def room_version = &quot;2.2.5&quot;
      def lifecycle_version = &quot;2.2.0&quot;
      def arch_version = &quot;2.1.0&quot;
      implementation &quot;androidx.room:room-runtime:$room_version&quot;
      annotationProcessor &quot;androidx.room:room-compiler:$room_version&quot;
  
      // optional - RxJava support for Room
      implementation &quot;androidx.room:room-rxjava2:$room_version&quot;
      // optional - Guava support for Room, including Optional and ListenableFuture
      implementation &quot;androidx.room:room-guava:$room_version&quot;
      // optional - Test helpers
      testImplementation &quot;androidx.room:room-testing:$room_version&quot;
  
      //lifecycle
      implementation &quot;androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version&quot;
      annotationProcessor &quot;androidx.lifecycle:lifecycle-compiler:$lifecycle_version&quot;
      androidTestImplementation &quot;androidx.arch.core:core-testing:$arch_version&quot;
  
      implementation &quot;com.google.android.material:material:1.0.0&quot;
      /*implementation &quot;com.android.support:support-compat:28.0.0&quot;
      implementation &quot;com.android.support:design:25.0.0&quot;
  
      implementation &quot;com.android.support:appcompat-v7:27.1.1&quot;
      implementation &quot;com.android.support:support-v4:27.1.1&quot;
      implementation &quot;com.android.support:design:27.1.1&quot;
      //implementation 'com.android.support.constraint:constraint-layout:1.1.0' */
  }
  </code></pre>