Home > database >  FAILURE: Build failed with an exception. Could not resolve all files for configuration
FAILURE: Build failed with an exception. Could not resolve all files for configuration

Time:11-19

I have problem when i installing some dependencies:

dependencies:
  youtube_player_iframe: ^2.2.2

when i run my flutter and throw some error :

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flutter_local_notifications:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':flutter_local_notifications:debugCompileClasspath'.
   > Could not download threetenbp-1.4.2-no-tzdb.jar (org.threeten:threetenbp:1.4.2)
      > Could not get resource 'https://repo.maven.apache.org/maven2/org/threeten/threetenbp/1.4.2/threetenbp-1.4.2-no-tzdb.jar'.
         > Could not GET 'https://repo.maven.apache.org/maven2/org/threeten/threetenbp/1.4.2/threetenbp-1.4.2-no-tzdb.jar'.
            > This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server (repo.maven.apache.org)

* 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 20s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1

Is there a way to fix this?

CodePudding user response:

Turn off firewall and this work :)

  • Related