无法解析:com.android.support:cardview-v7:24.0.1 和)无法解析:com.android.support:appcompat-v7:24.0.1
这是gradle配置 我需要做什么来解决这个问题 请帮助我
apply plugin: 'com.android.application'
compileSdkVersion 24
buildToolsVersion '24.0.1'
defaultConfig {
applicationId 'com.fanbaseafrica.fabaservices'
minSdkVersion 14
targetSdkVersion 24
versionCode 2
versionName '2.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.config
renderscriptOptimLevel 3
}
debug {
debuggable true
}
}
productFlavors {
}
}
repositories {
jcenter()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:cardview-v7:24.0.1'
compile 'com.android.support:appcompat-v7:24.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:design:24.0.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.google.code.gson:gson:2.2.3'
compile 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:recyclerview-v4:24.0.1'
compile 'com.android.support:support-v7:24.0.1'
compile 'com.koushikdutta.ion:ion:2.1.6'
compile 'com.sprylab.android.texturevideoview:texturevideoview:1.1.1'
}
最佳答案
发生这种情况是因为 24.0.1 的支持库不存在。
使用有效版本更改所有支持库依赖项:
24.0.0
24.1.0
24.1.1
24.2.0
这里所有history .
还有一些依赖项是错误的:
更改:
compile 'com.android.support:recyclerview-v4:24.0.1'
与
compile 'com.android.support:recyclerview-v7:24.X.X'
'com.android.support:support-v7:24.X.X'
不存在。
使用
编译“com.android.support:support-v4:24.x.x”
。
关于android - gradle 构建失败错误 : Failed to resolve: com. android.support :cardview-v7:24. 0.1 和)无法解析 : com. android.support :appcompat-v7:24. 0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39247294/