学习老的Android教程书的时候,比如说是第一行代码。会遇到老的包导入不进去,出现问题。
可能的报错:
Version 28 (intended for Android Pie and below) is the last version of the legacy support library
参考网页
原因和大概情况 介绍为什么会出现加入依赖出错
https://zhuanlan.zhihu.com/p/96168914
https://developer.android.com/jetpack/androidx/migrate#artifact_mappings
解决方案
https://blog.csdn.net/lfdfhl/article/details/105269551
例子
如果导入compile ‘com.android.support:recycleview-v7:24.2.1’
报错28,这时候把它改为
implementation ‘androidx.recyclerview:recyclerview:1.0.0’