Andriod Studio报错提示:

Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:28.+

 

原因:Andriod Studio所使用的sdk版本与build.gradle配置文件中的配置不符,

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:28.+'
testCompile 'junit:junit:4.12'
}

通过sdk manager查看sdk版本为下图红色部分,即26.1.1
Andriod Studio 解决问题 Failed to resolve: com.android.support:appcompat-v7:28.+

com.android.support:appcompat-v7:28.+ 中28 改为26,如下图,即可编译通过
Andriod Studio 解决问题 Failed to resolve: com.android.support:appcompat-v7:28.+

相关文章:

  • 2021-06-30
  • 2022-12-23
  • 2021-07-24
  • 2021-05-08
  • 2021-12-31
  • 2021-12-08
  • 2021-07-23
猜你喜欢
  • 2022-12-23
  • 2021-11-27
  • 2021-11-16
  • 2021-07-01
  • 2021-09-21
  • 2021-12-15
相关资源
相似解决方案