‘This support library should not use a different version’解決方案


在導入compile ‘com.android.support:recyclerview-v7:24.2.0’時,提示了以下的錯誤。

This support library should not use a different version (24) than the compileSdkVersion (23) less… (Ctrl+F1) 
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)

出現此問題的原因是,我的targetSdkVersion是23的,所以引用上邊的recyclerview時會報錯誤。

解決方法: 
compile ‘com.android.support:recyclerview-v7:23.2.0’ 將24改為23即可。 
這個版本需要對應你是targetSdkVersion版本就可以解決此問題了

轉載:http://blog.csdn.net/mvpstevenlin/article/details/55209966


免責聲明!

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



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