天天看点

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      

继续阅读