Reputation: 1549
Earlier my project was running without error but today i am getting following error. I would appreciate if anyone can help to get out of this issue.
Note- I am not using jCenter in my app, payment sdk flutter_stripe using jCenter
FAILURE: Build failed with an exception.
* 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.12.+.
Required by:
project :app > project :stripe_android
> Failed to list versions for com.stripe:stripe-android.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/stripe/stripe-android/maven-metadata.xml.
> Could not HEAD 'https://jcenter.bintray.com/com/stripe/stripe-android/maven-metadata.xml'.
> Read timed out
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 47s
Exception: Gradle task assembleDebug failed with exit code 1
Upvotes: 6
Views: 2540
Reputation: 21
I also had this problem and for two days I tried to figure out what the cause was. The problem is jcenter. Not so why it decided not to work. I solved it by replacing with mavenCentral in your project level build.gradle.
If you also have the "Stripe" plugin, you have to add this extension as well as the user indicated above
Upvotes: 2
Reputation: 1549
Here is a link to a solution in the flutter_stripe issue list
You need to add the following line inside app level build.gradle file:
constraints { implementation('com.stripe:stripe-android') { version { strictly '20.11.0' } } }
constraints { implementation('com.stripe:financial-connections') { version { strictly '20.11.0' } } }
Upvotes: 4
Reputation: 21
Jcenter seems down today.I guess you should switch to mavenCentral instead.
Upvotes: 1