Android Gradle 项目同步由于未解析的依赖项而失败



我最近在我的应用程序级别build.gradle中添加了一个卡片堆栈视图依赖项(实现'com.yuyakaido.android:card-stack-view:2.3.4'(,之后我的项目出现同步失败,如下所示:-

错误:无法解决:安卓
受影响的模块:应用

这是我的build.gradle

apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.animeapp.brijender.myapp"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:run ner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.yuyakaido.android:card-stack-view:2.3.4'
}

谁能帮助我可能做错了什么?

只需在项目的build.gradle中添加jCenter存储库(或者如果您使用的是新方式,只需将其添加到设置.gradle中(

pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter()
}
}

包括":应用">

只需要删除这些依赖项 androidTestImplementation 'androidx.test:run ner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

最新更新