Gradle threw an error while downloading artifacts from the network retrying to download

Hi, I am new to flutter, learning and trying to get my first app to work. I'am trying to research some solution but isn't work. plz help me. tks Exception in thread "main" java.io...

@dat036

Hi, I am new to flutter, learning and trying to get my first app to work. I’am trying to research some solution but isn’t work.
plz help me. tks

Exception in thread «main» java.io.IOException: Unable to tunnel through proxy. Proxy returns «HTTP/1.1 403 Request blocked by Privoxy»
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2152)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2739)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2651)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install$1.call(Install.java:61)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Running Gradle task ‘assembleDebug’…
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download…
Exception in thread «main» java.io.IOException: Unable to tunnel through proxy. Proxy returns «HTTP/1.1 403 Request blocked by Privoxy»
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2152)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2739)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2651)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install$1.call(Install.java:61)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download…
Exception: Gradle task assembleDebug failed with exit code 1

@darshankawar

Hi @dat036,
Can you try this solution and see if it works for you ?
Thanks.

@TahaTesser

Without additional information we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don’t hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

@hojamedov

Hi, I am also new to flutter, I have same error on my first flutter projec. Please help me solve the error!

Exception in thread «main» java.io.IOException: Unable to tunnel through proxy. Proxy returns «HTTP/1.1 403 Request blocked by Privoxy»
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2152)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2739)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2651)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install$1.call(Install.java:61)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Running Gradle task ‘assembleDebug’…
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download…
Exception in thread «main» java.io.IOException: Unable to tunnel through proxy. Proxy returns «HTTP/1.1 403 Request blocked by Privoxy»
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2152)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2739)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2651)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1830)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
at org.gradle.wrapper.Download.download(Download.java:44)
at org.gradle.wrapper.Install$1.call(Install.java:61)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download…
Exception: Gradle task assembleDebug failed with exit code 1

@shangab

@TahaTesser

Can you please provide your flutter doctor -v your flutter run --verbose and a complete reproducible minimal code sample
Thank you

@dat036

Hi @dat036,
Can you try this solution and see if it works for you ?
Thanks.

it’s work for me. tks a lot

@leenjiru

This worked for me, hope it helps.

@github-actions

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions
github-actions
bot

locked as resolved and limited conversation to collaborators

Aug 8, 2021

Gradle threw an error while downloading artifacts from the network. Retrying to download… in android studio

Questions : Gradle threw an error while downloading artifacts from the network. Retrying to download… in android studio

2023-02-06T19:24:58+00:00 2023-02-06T19:24:58+00:00

736

When I try to build android app I get this solved uvdos android-studio error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processTESTDebugResources'.
> Could not resolve all task dependencies for configuration ':app:TESTDebugRuntimeClasspath'.
   > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.
     Required by:
         project :app
      > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.
         > Could not get resource 'https://google.bintray.com/exoplayer/io/flutter/arm64_v8a_debug/1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8/arm64_v8a_debug-1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.pom'.
            > Could not GET 'https://google.bintray.com/exoplayer/io/flutter/arm64_v8a_debug/1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8/arm64_v8a_debug-1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve io.flutter:x86_debug:1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.
     Required by:
         project :app
      > Could not resolve io.flutter:x86_debug:1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.
         > Could not get resource 'https://google.bintray.com/exoplayer/io/flutter/x86_debug/1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8/x86_debug-1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.pom'.
            > Could not GET 'https://google.bintray.com/exoplayer/io/flutter/x86_debug/1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8/x86_debug-1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.pom'. Received status code 502 from server: Bad Gateway
   > Could not resolve io.flutter:x86_64_debug:1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.
     Required by:
         project :app
      > Could not resolve io.flutter:x86_64_debug:1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.
         > Could not get resource 'https://google.bintray.com/exoplayer/io/flutter/x86_64_debug/1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8/x86_64_debug-1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.pom'.
            > Could not GET 'https://google.bintray.com/exoplayer/io/flutter/x86_64_debug/1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8/x86_64_debug-1.0.0-40a99c595137e4b2f5b2efa8ff343ea23c1e16b8.pom'. 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 7m 30s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...

I’m using Mac OS, flutter and android solved uvdos android-studio studio. I can build iOS app without any such solved uvdos android-studio error.How can I fix this?

I tried this one,

Go to flutter_app => android => gradle => wrapper directory
Delete gradle-wrapper.jar file
Open and edit gradle-wrapper.properties file
Change distributionUrl=https://services.gradle.org/distributions/gradle-x.x.x-all.zip to gradle-7.2-all.zip or latest
On terminal use flutter run command

But still I get the same error.

this is my android/build.gradle file:

Total Answers 1

31

Answers 1 : of Gradle threw an error while downloading artifacts from the network. Retrying to download… in android studio

As it says in stack trace, try to quotes uvdos android-studio download dependencies from url quotes uvdos android-studio https://google.bintray.com/ but get 502 quotes uvdos android-studio http error. if you test this link on quotes uvdos android-studio browser you’ll get this error too. Refer quotes uvdos android-studio to this link this might be temporary quotes uvdos android-studio error from the repository.

you can also replace all your jcenter() quotes uvdos android-studio from your repository closure in quotes uvdos android-studio build.gradle with mavenCentral(). sync quotes uvdos android-studio Gradle and build again.

0

2023-02-06T19:24:58+00:00 2023-02-06T19:24:58+00:00Answer Link

mRahman

Posted By: Anonymous

I upgraded from flutter 1.22.6 to 2.2, when I tried to run the default counter app, I ran into this error. I have tried downgrading my Gradle version and also upgrading it, still didn’t fix it.

I also tried the solution from this thread and it didn’t work

Here is the console output:

 Launching libmain.dart on SM G925F in debug mode...
Running Gradle task 'assembleDebug'...
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:225)
    at java.util.zip.ZipFile.<init>(ZipFile.java:155)
    at java.util.zip.ZipFile.<init>(ZipFile.java:169)
    at org.gradle.wrapper.Install.unzip(Install.java:214)
    at org.gradle.wrapper.Install.access$600(Install.java:27)
    at org.gradle.wrapper.Install$1.call(Install.java:74)
    at org.gradle.wrapper.Install$1.call(Install.java:48)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    at org.gradle.wrapper.Install.createDist(Install.java:48)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Running Gradle task 'assembleDebug'...
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:225)
    at java.util.zip.ZipFile.<init>(ZipFile.java:155)
    at java.util.zip.ZipFile.<init>(ZipFile.java:169)
    at org.gradle.wrapper.Install.unzip(Install.java:214)
    at org.gradle.wrapper.Install.access$600(Install.java:27)
    at org.gradle.wrapper.Install$1.call(Install.java:74)
    at org.gradle.wrapper.Install$1.call(Install.java:48)
    at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
    at org.gradle.wrapper.Install.createDist(Install.java:48)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1

Solution

I solved this issue by downloading gradle 7.0 manually and also build tools 29.0

Answered By: Anonymous

Related Articles

  • Error ‘Map’, but got one of type ‘Null’ flutter web with…
  • Flutter: RenderBox was not laid out
  • How do you create a custom neon animation in Dart
  • Gradle error: Execution failed for task…
  • Jetpack Compose and Hilt Conflict
  • Error using core-scaffold from polymer JS in the latest…
  • org.gradle.api.tasks.TaskExecutionException: Execution…
  • Execution failed for task ‘:app:compileDebugJavaWithJavac’…
  • Unhandled Exception: Invalid argument(s) (value): Must not…
  • Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or…

Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.

Понравилась статья? Поделить с друзьями:
  • Gradle sync failed android studio как исправить
  • Gradle project sync failed basic functionality will not work properly как исправить
  • Gradle jdk error
  • Gradle error unmappable character for encoding cp1251
  • Gradle error in opening zip file