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

 

解决方法:在gradle.properties内加入

android.useAndroidX=true
Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐