尝试将卡视图和回收器视图依赖项添加到我的应用程序时,我遇到了上述错误。
以下是我在应用级别 build.gradle 中的依赖项:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-core-utils:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.android.support.cardview-v7:28.0.0'
implementation 'com.android.support.recyclerview-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.1'
}
我相信我在我的项目级 buildgradle 中有相关的存储库输入,如下所示。所以我不确定为什么我会收到这个错误。
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}