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. Set this property to true in the gradle.properties file and retry.
The following AndroidX dependencies are detected: androidx.annotation:annotation:1.0.2
Affected Modules: app

找到gradle.properties,增加:

android.useAndroidX=true
android.enableJetifier=true

猜你喜欢

转载自blog.csdn.net/quantum7/article/details/108302426