android invoke-customs are only supported starting with android o code example
Example: Invoke-customs are only supported starting with Android O (--min-api 26)
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}