Sur*_*mar 13 android android-studio android-gradle-plugin android-recyclerview
在我的项目中添加依赖项实现'com.azoft.carousellayoutmanager:carousel:1.2.4'时,Android Studio会抛出异常,无法解析:recyclerview-v7.然后我尝试为recyclerview添加依赖项.仍然得到同样的错误.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.someapp"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.3.1'
implementation 'com.commonsware.cwac:saferoom:0.4.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:cardview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
Rad*_*esh 41
我有同样的问题,我改变repositoriesbiuld.gradle(app)的顺序,问题解决了.
变化:
jcenter()
google()
Run Code Online (Sandbox Code Playgroud)
至 :
google()
jcenter()
Run Code Online (Sandbox Code Playgroud)
希望它有所帮助
| 归档时间: |
|
| 查看次数: |
10567 次 |
| 最近记录: |