2021-08-25 Android studio 编译提示Version 28 (intended for Android Pie and below) is the last version of

一、如下提示

Version 28 (intended for Android Pie and below) is the last version of the 
legacy support library, so we recommend that you migrate to AndroidX libraries 
when using Android Q and moving forward. The IDE can help with this: Refactor
 > Migrate to AndroidX... less... (Ctrl+F1) 
Inspection info: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: GradleCompatible

二、报错原因:

      1、由于Android Studio 版本较高,添加库依赖已经不支持compile语句,应使用implementation或者api.

      2、若使用api或implementation语句仍然报错,可能是库的版本较低,出现了不兼容的现象。

      3、由于原来的support 库太乱了,谷歌在新版本中取消了support库,使用了新的andriodX库。

三、为了解决上述问题,我们需要将原理的support库迁移到AndroidX并使用implementation添加依赖。

 

 

 四、类映射,下表列出了从旧支持库软件包到新 androidx 软件包的当前映射关系。您也可以下载包含这些映射信息的 CSV 格式文件。 

       详细的类映射https://developer.android.google.cn/jetpack/androidx/migrate/class-mappings#androidsupportv7

 

五、参考文章

       1、https://www.freesion.com/article/2023437918/

       2、https://stackoverflow.com/questions/57546020/package-android-support-v7-app-does-not-exist-error-in-androidstudio

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值