Setting the minSdkVersion to 21 from 19 solved the issue for me.
defaultConfig {
applicationId "com.example"
minSdkVersion 21
targetSdkVersion 29
versionCode 23
versionName "1.0"
vectorDrawables.useSupportLibrary = true
}