只需要在build.grade中写入依赖
implementation 'com.jcodecraeer:xrecyclerview:1.5.9'
并且在android括号中写入以下代码
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '28.0.0'//根据你的底下appcompat-v7版本
}
}
}
}