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
The Design Support library adds support for various material design components and patterns for app developers to build upon, such as navigation drawers, floating action buttons (FAB), snackbars, and tabs.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right. Select /path/to/appcompat/ and Click Remove. Click Add to open the Project Selection dialog. From the list of available library projects, select v7 appcompat library and click OK.
Update the Android Support LibraryIn Android Studio, click the SDK Manager icon from the menu bar, launch standalone SDK Manager, select Android Support Repository and click “Install x packages” to update it. Note you will see both Android Support Repository and Android Support Library listed in the SDK Manager.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With