Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter - Build failed with an exception

When I launched my app, I got this error message. I did not make any changes since last run, when everything was fine. Does anybody know how to solve this? Thank you.

FAILURE: Build failed with an exception.
  • What went wrong: Could not determine the dependencies of task ':app:processDebugResources'.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not resolve io.grpc:grpc-core:[1.28.0]. Required by: project :app > project :cloud_firestore > com.google.firebase:firebase-firestore:22.1.2 > io.grpc:grpc-android:1.28.0 project :app > project :cloud_firestore > com.google.firebase:firebase-firestore:22.1.2 > io.grpc:grpc-okhttp:1.28.0 > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://google.bintray.com/exoplayer/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://google.bintray.com/exoplayer/io/grpc/grpc-core/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

  • 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 6s Exception: Gradle task assembleDebug failed with exit code 1

like image 633
user17550050 Avatar asked Nov 18 '25 19:11

user17550050


1 Answers

The solution I founded was upgrade all my packages.

flutter pub upgrade --major-versions

After treat all the issues and problems.

Upgrade the kotlin version too.

from ext.kotlin_version = '1.3.50' to ext.kotlin_version = '1.4.32'

Or the latest Kotlin version.

Try to run your project again.

like image 77
Leonardo Castro Avatar answered Nov 21 '25 10:11

Leonardo Castro



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!