I'm trying to add in-app billing as described here:
<https://developer.android.com/google/play/billing/integrate>
and think I have set up dependencies as instructed, but still, both the BillingClient and PurchasesUpdateListener classes as in the code example on the page are not available.

My project's build.gradle:

```
apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '29.0.2'

    defaultConfig {
        applicationId "com.myproject"
        minSdkVersion 17
        targetSdkVersion 26
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
android {
    useLibrary 'org.apache.http.legacy'
}
dependencies {   
    implementation 'com.google.android.gms:play-services-ads:19.5.0'
    implementation 'com.android.billingclient:billing:3.0.1'
}

```

My top-level build.gradle:

```
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}

```

How to fix this?