title: How to fix : ERROR: Failed to resolve: 'androidx.cardview:cardview:1.0.0'
body: <p>I'm developing a new android application by using <strong>androidx libraries</strong>, and i need to use <strong>cardview</strong> in my layout.<br />
  so i try to add cardview library to my project but i get this error <code>ERROR: Failed to resolve: cardview</code></p>
  <p>i check answers of <a href="https://stackoverflow.com/questions/45103230/failed-to-resolve-com-android-supportcardview-v726-0-0-android">Failed: com.android.support:cardview-v7:26.0.0 android</a>, but it doesn't help me<br />
  answers like</p>
  <ul>
  <li>add <code>google()</code> before <code>jcenter()</code></li>
  <li>add <code>maven { url &quot;https://maven.google.com&quot; }</code> to <code>repositories</code></li>
  </ul>
  <hr />
  <p>build.gradle(project)</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId &quot;com.chavosh.porterageapp&quot;
          minSdkVersion 14
          targetSdkVersion 28
          versionCode 1
          versionName &quot;1.0&quot;
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
          vectorDrawables.useSupportLibrary = true
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.google.android.gms:play-services-maps:16.1.0'
      implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
      testImplementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'com.google.android.material:material:1.0.0'
      testImplementation 'junit:junit:4.12'
  
      // recycler view
      implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
  
      implementation 'androidx.cardview:cardview:1.0.0'
  
  }
  
  </code></pre>
  <p>build.gradle(moudle)</p>
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.0'
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21&quot;
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
          mavenCentral()
          maven { url 'https://jitpack.io' }
          maven { url &quot;https://maven.google.com&quot; }
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  
  </code></pre>
  <p>gradle.properties has this two line</p>
  <pre><code>android.useAndroidX=true
  android.enableJetifier=true
  </code></pre>
  <p><a href="https://i.stack.imgur.com/sWzKC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sWzKC.jpg" alt="error pic" /></a></p>