I am trying to implement a cardView, where when the user presses the FAB, a cardView is created dynamically. However, when I put the following bit of code in the gradle dependencies, I get an error:
implementation 'com.android.support:cardview-v7:23.0.+'
implementation 'com.android.support:recyclerview-v7:23.0.+'
It says 'This support library should not use a different version (23) than the compileSdkversion 27.
Currently, my apk level is 16.
What's the problem?
Just replace with this dependency in your Gradle.build:
com.android.support:cardview-v7:27.1.1
com.android.support:recyclerview-v7:27.1.1
Currently, you have used compileSdkversion 27
. So you need to update dependency to 27
.
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
Don't try to use +
sign for integrating dependency.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.