android studio的报错提示:
                
                
                
                
                
:app:checkDebugAarMetadata
This project uses AndroidX dependencies, but the ‘android.useAndroidX’ property is not enabled. Set this property to true in the gradle.properties file and retry
This project uses AndroidX dependencies, but the ‘android.useAndroidX’ property is not enabled

                
                
                
                
                
报错信息可能是android support包与androidx冲突问题
我使用的是android support包

先看一下Project的External Libraries中有没有androidx库

找到androidx库了,就知道androidx的依赖包我刚添加了,如下:

implementation 'com.github.bumptech.glide:glide:4.10.0'

这依赖包的4.10.0版本开始引用androidx库,那试试改回退到3.7.0版本(androidx库转换android库)

implementation 'com.github.bumptech.glide:glide:3.7.0'

点击右上角“Sync now”同步新编译,依赖androidx库转换成android库成功,看来问题解决了,External Libraries如下图:

GitHub 加速计划 / de / Dependencies
8.6 K
704
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:1 个月前 )
1997a400 - 2 年前
2f423539 - 2 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐