尝试构建我的 android 应用程序时出现以下错误:
任务 :app:mergeDebugResources 失败
FAILURE:构建失败,出现异常。
此项目使用 AndroidX 依赖项,但未启用 'android.useAndroidX' 属性。在 gradle.properties 文件中将此属性设置为 true 并重试。检测到以下 AndroidX 依赖项:androidx.versionedparcelable:versionedparcelable:1.0.0、androidx.slidingpanelayout:slidingpanelayout:1.0.0、androidx.fragment:fragment:1.0.0、androidx.core:core:1.0.0、androidx.customview :customview:1.0.0, androidx.swiperrefreshlayout:swiperrefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpage :viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0 .0, androidx.annotation:annotation:1.0.0, androidx.
我修改了项目的 gradle.properties 文件并将“android.userAndroidX”设置为 true。但是每次我尝试再次构建时,它都会自动返回 false。gradle.properties 在构建过程中是否有可能被任何其他任务覆盖?
谢谢!