Bri*_*mar 2 android build.gradle
我最近向我的应用程序级别 build.gradle 添加了一个卡堆栈视图依赖项(实现“com.yuyakaido.android:card-stack-view:2.3.4”),之后我的项目出现同步失败,例如:-
错误:无法解决:androidx
受影响的模块:app
这是我的 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'
}
Run Code Online (Sandbox Code Playgroud)
谁能帮助我可能做错了什么?
小智 6
只需在project\xe2\x80\x99s build.gradle中添加jCenter存储库(或者如果您使用新方式,只需将其添加到settings.gradle中)
\npluginManagement {\n repositories {\n gradlePluginPortal()\n google()\n mavenCentral()\n }\n}\ndependencyResolutionManagement {\n repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n repositories {\n google()\n mavenCentral()\n jcenter()\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n包括“:应用程序”
\n| 归档时间: |
|
| 查看次数: |
915 次 |
| 最近记录: |