Gerardo
Gerardo

Reputation: 310

Stripe Android, Cannot resolve symbol 'PaymentConfiguration'

I'm trying to add a Payment Method in Stripe. In the client side (android) I'm adding the dependency implementation 'com.stripe:stripe-android:19.1.0'

The gradle version looks like

dependencies {
    ...
    classpath 'com.google.gms:google-services:4.3.3'
    classpath 'com.android.tools.build:gradle:4.0.2'
}

And my gradle app file version looks like

apply plugin: 'com.android.application'
android {
    compileSdkVersion 31
    defaultConfig {
        applicationId "com.buscaride.dev"
        minSdkVersion 21
        targetSdkVersion 31
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    dataBinding{
        enabled=true
    }
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
    }
}
dependencies {
    ...
    implementation 'androidx.appcompat:appcompat:1.4.0'
    ...
    implementation 'com.stripe:stripe-android:19.1.0'
}

So, when I try to import com.stripe.android.PaymentConfiguration; it says:

Cannot resolve symbol 'PaymentConfiguration'

No clue what I'm missing

Upvotes: 3

Views: 1183

Answers (2)

Blaz Balon
Blaz Balon

Reputation: 244

Worked for me when I upgraded Android Studio to latest version.

Upvotes: 1

Otourou Da Costa
Otourou Da Costa

Reputation: 162

Did you tried to invalidate Caches in "File Menu -> Invalidate Caches / Restart"?

Upvotes: 0

Related Questions