AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

场景

Android Studio中在新建项目时勾选了

Use legacy android.support licrary

AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

 

 

AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

然后在运行项目时提示:

This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

 

 

博客:
https://blog.csdn.net/badao_liumang_qizhi
关注公众号
霸道的程序猿
获取编程相关电子书、教程推送与免费下载。

实现

打开项目下gradle.properties

添加如下两行代码

android.useAndroidX=true
android.enableJetifier= true

添加位置如下

AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

 

AndroidStudio中提示:This project uses AndroidX dependencies, but the ‘android.useAndroidX‘ property is not enabled

上一篇:js 判断手机是否全面屏


下一篇:中国制造2025 带动机器视觉进入快速车道