1. 程式人生 > >This support library should not use a different version (24) than the compileSdkVersion (28)

This support library should not use a different version (24) than the compileSdkVersion (28)

報錯:This support library should not use a different version (24) than the compileSdkVersion (28) 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).  Issue id: GradleCompatibl

 

出現原因:在學習《第一行程式碼》中的RecycleView時,往build.gradle中新增依賴庫的時候出現錯誤,新增內容是

compile'com.android.support:recyclerview-v7:24.2.1'

其實翻譯下報錯英文猜測是因為我的SDK版本已經到28了,不能用低版本的依賴庫,所以改成和我版本相同的就解決了

implementation 'com.android.support:recyclerview-v7:28.0.0-alpha1'

 

 

---記錄菜鳥學習過程中的點點滴滴