Import new Android Design Support library

You have to update your Android Support Repository in SDK Manager, then just add this dependency to your build.gradle:

compile 'com.android.support:design:22.2.0'

com.android.support:support-design:22.0.0 is wrong.


New Android Design Libraries usually start with androidx word, such as:

AppCompat androidx:

implementation 'androidx.appcompat:appcompat:1.2.0'

CardViex androidx:

implementation 'androidx.cardview:cardview:1.0.0'

However be careful because everything is not start with androidx. For example, old design dependency is:

implementation 'com.android.support:design:28.0.0'

But new design dependency is:

implementation 'com.google.android.material:material:1.1.0'

Recyclerview dependency is:

implementation 'androidx.recyclerview:recyclerview:1.2.0'

So, you have to search and read carefully.


dependencies {
    implementation 'com.android.support:design:28.0.0'
}