Andriod Studio 解決問題 Failed to resolve: com.android.support:appcompat-v7:28.+


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,如下圖,即可編譯通過


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM