I am getting following error while trying to build Android app in Flutter project
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.stripe:stripe-android:20.4.1.
Required by:
project :app > project :stripe_android
> Could not resolve com.stripe:stripe-android:20.4.1.
> Could not get resource 'https://google.bintray.com/exoplayer/com/stripe/stripe-android/20.4.1/stripe-android-20.4.1.pom'.
> Could not GET 'https://google.bintray.com/exoplayer/com/stripe/stripe-android/20.4.1/stripe-android-20.4.1.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve com.stripe:financial-connections:20.4.1.
Required by:
project :app > project :stripe_android
> Could not resolve com.stripe:financial-connections:20.4.1.
> Could not get resource 'https://google.bintray.com/exoplayer/com/stripe/financial-connections/20.4.1/financial-connections-20.4.1.pom'.
> Could not GET 'https://google.bintray.com/exoplayer/com/stripe/financial-connections/20.4.1/financial-connections-20.4.1.pom'. Received status code 502 from server: Bad Gateway
pubspec.yaml file
flutter_stripe:
android/build.gradle file
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I think the problem is related to jcentre()
but not using jcentre()
in my app or stripe
is also not using it but still I am getting the error.
Build just retries again and again but always the same error.