Import new Android Design Support library
J

10

15

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

Jambeau answered 30/5, 2015 at 6:32 Comment(0)
S
27

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.

Shenyang answered 30/5, 2015 at 12:40 Comment(2)
using this implementation I get this problem: Version 28 (intended for Android Pie and below) is the last version of the legacy support library, so we recommend that you migrate to AndroidX libraries when using Android Q and moving forward. The IDE can help with this: Refactor > Migrate to AndroidX...Diannadianne
@Diannadianne This answer was posted 8 years ago.Shenyang
A
6
dependencies {
    implementation 'com.android.support:design:28.0.0'
}
Arhat answered 30/11, 2018 at 15:48 Comment(0)
V
6

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.

Victuals answered 6/4, 2020 at 10:8 Comment(0)
D
2

The docs has it wrong.

It should actually be 'com.android.support:design:22.2.0'

as mentioned in their official blog.

Detoxify answered 30/5, 2015 at 10:34 Comment(0)
H
2

With gradle 3 it should be:

dependencies {
    implementation 'com.android.support:design:27.0.2'
}
Heptagonal answered 9/1, 2018 at 13:34 Comment(0)
H
1

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!

Android Support Library, revision 22.2.1 (July 2015)

Heritage answered 9/8, 2015 at 15:57 Comment(0)
C
1

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

Clarisclarisa answered 29/11, 2017 at 12:3 Comment(0)
V
1
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.

Vermiculate answered 28/9, 2019 at 18:21 Comment(0)
L
1

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'
Loma answered 25/7, 2020 at 21:58 Comment(1)
to give more context for this answer: support libs are deprecated by now and replaced with AndroidX libs developer.android.com/topic/libraries/support-library. this is the replacement for the design lib it was renamed to materialErikaerikson
C
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)
Condemnatory answered 9/5, 2024 at 2:47 Comment(1)
this helped me to fix the dependency bug inside Android Studio with JellyFishCondemnatory

© 2022 - 2025 — McMap. All rights reserved.