Please I get this error when syncing my project with the dependency. The error is given below.
Gradle sync failed: Could not get unknown property 'androidxVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Update:
Fixed the issue by addding the specific version number of androidx.preference, that is, implementation "androidx.preference:preference:1.0.0". But still wondering wasn't the version number provided by $androidxVersion?