诺虫的箱子

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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



将 com.android.support:appcompat-v7:28.+ 中28 改为26,如下图,即可编译通过

posted on 2019-10-13 19:55  诺虫的箱子  阅读(694)  评论(0)    收藏  举报