Failed to resolve: recyclerview-v7

I have same problem and i'm change order of repositories in biuld.gradle (app) and problem solved.

Change :

 jcenter()
 google()

To :

 google()
 jcenter()

Hope it's help


  1. In Android Studio go to build.gradle (Project: YourProjectName), NOT the build.gradle (Module: app)
  2. Change the code, so it looks like this (switch google() and jcenter()):

    allprojects {
        repositories {
            google()
            jcenter()
        }
    }
    

Add maven to repositories and it should work


I have no idea why. But my exact same problem has been solved with commenting all of android support dependencies. It's so strange. But now my project runs without adding another version of these dependencies. When I put only one of these dependencies, I have a warning between ver 27.1.1 and 28.0.0 of support libraries. But I've only used version 28 on this project. It means there is all of these dependencies somewhere in the gradle which obviously is not written by me, or may be it's in the sth like cache (So strange bug).

implementation "com.android.support:support-v4:28.0.0"
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:support-vector-drawable:28.0.0"
implementation "com.android.support:recyclerview-v7:28.0.0"
implementation "com.android.support:design:28.0.0"
implementation "com.android.support.constraint:constraint-layout:1.1.3"