Hi i'am trying to import the new android support library like this com.android.support:support-design:22.0.0
but i got this error after sync the gradle : failed to find
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.
dependencies {
implementation 'com.android.support:design:28.0.0'
}
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.
With gradle 3 it should be:
dependencies {
implementation 'com.android.support:design:27.0.2'
}
You can use:
compile 'com.android.support:design:22.2.0'
I built a complete example. I hope it helps! https://github.com/erikcaffrey/AndroidDesignSupportLibrary
Remember now is available!
ctrl+alt+shift+s in the androidstudio window...
project structure window will appear..
click the app in the menu bar at the left then click dependencies..
then add `com.android.support:design:26.1.0
implementation 'com.android.support:design:28.0.0'
Click on 'File' --> 'Project Structure' (or CTRL+ALT+SHIFT+S) --> Select 'Dependencies' --> Click on '+' in the 'All Dependencies' section --> Select '1.Library Dependency'--> here you can search for any library to implement in your android studio project.
i was facing the same problem actually this is old one. Just replace it with the following code:
implementation 'com.google.android.material:material:1.1.0'
dependecy for design support library in androidx design became this;
first go to build.gradle.kts(module:app)
inside dependency add:
implementation (":com.android.support:design:28.0.0")
once you this you will get notify by android studio to import it to new library catalogue that's here after sync:
implementation(libs.design)
© 2022 - 2025 — McMap. All rights reserved.