作者:禾漾啊 | 来源:互联网 | 2022-12-07 01:10
错误:同步失败。未解决的Android依赖项。无法解决:com.android.support:appcompat-v7:28.1.1
配置:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.ercess.ercess_app1"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:appcompat-v7:28.1.1'
implementation 'com.squareup.picasso:picasso:2.71828'
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'
}
如何解决呢?
1> Qasim..:
更换
implementation 'com.android.support:appcompat-v7:28.1.1
与
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
当前,appCompat的最新可用版本是28.0.0-rc01,您正尝试提取appcompat库的不可用版本。
rc01是候选版本,而不是最新的稳定版本。
2> Nhất Giang..:
根本原因:版本28.1.1不存在。
解决方案:使用最新的稳定版本
implementation 'com.android.support:appcompat-v7:27.1.1'
或使用最新的不稳定版本
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'