Home > Software engineering >  Getting error while trying to run flutter app in andoid studio
Getting error while trying to run flutter app in andoid studio

Time:01-13

Launching lib\main.dart on Infinix X559C in debug mode... Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':cloud_firestore:extractDebugAnnotations'.

Could not resolve all files for configuration ':cloud_firestore:lintClassPath'. Could not download groovy-all-2.4.15.jar (org.codehaus.groovy:groovy-all:2.4.15) > Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'. > Premature end of Content-Length delimited message body (expected: 7�164�868; received: 6�553�552)

  • 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 14m 14s [!] Gradle threw an error while downloading artifacts from the network. Retrying to download... Running Gradle task 'assembleDebug'...

CodePudding user response:

First thing to check would be is to see if this is happening with only this project?

Can you try to create a new project and run it.

CodePudding user response:

Even though it's marked deprecated and sunset, jcenter will remain a read depo indefinitely. It seems that your dependency is on bintray however. You might need to find an alternative source

https://blog.gradle.org/jcenter-shutdown

UPDATE: JFrog has decided to keep JCenter as a read-only repository indefinitely. New package and versions are no longer accepted on JCenter. All Bintray services have been shutdown.

In your specific case, that lib can be found on maven, so try adding

repositories {
    mavenCentral()
}

to your build.gradle

You may also need to remove jCenter as a Repo and run gradle build clean

  •  Tags:  
  • Related