当更新了Android Studio之后编译出现了这样的问题: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.
The following AndroidX dependencies are detected: androidx.annotation:annotation:1.0.1

图片如下:

Android中使用AndroidX出现 but the 'android.useAndroidX' property is not enabled的问题解决办法

    图中显示问题(the 'android.useAndroidX' property is not enabled),即说明了使用了AndroidX的依赖,但是并没有在gradle.properties文件中使能,so,只需要在gradle.properties文件中加上如下两句即可:

android.useAndroidX=true
android.enableJetifier=true

Android中使用AndroidX出现 but the 'android.useAndroidX' property is not enabled的问题解决办法

相关文章:

  • 2022-01-01
  • 2021-12-12
  • 2021-04-06
  • 2021-05-19
  • 2021-12-27
  • 2021-09-23
  • 2021-09-14
  • 2021-06-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2021-11-23
  • 2021-07-11
  • 2021-08-20
相关资源
相似解决方案