This issue only occurs in Play Billing Library 7.1.1. It does not occur in Play Billing Library 7.0.0.
This issue has also been reported in the issue tracker, but there has been no official response yet.
[Play Billing Library 7.1.1] launchBillingFlow() does not work on Android 6 (Marshmallow)
As @Robert mentioned, Play Billing Library 7.1.1 seems to use classes available starting with Android 7 (Java 8).
Luckily, we have an Android 6 test device. We tested it by turning on the desugaring option in build.gradle.kts as below and confirmed that the issue is resolved.
I think this should be documented in the Play Billing Library 7.1.1 release notes.
build.gradle.kts
android {
...
compileOptions {
isCoreLibraryDesugaringEnabled = true
}
}
dependencies {
...
implementation( "com.android.billingclient:billing:7.1.1" )
coreLibraryDesugaring( "com.android.tools:desugar_jdk_libs:2.1.2" )
}