Android Studio: Gradle sync failed: Connection timed out: connect

后端 未结 15 2507
情话喂你
情话喂你 2020-12-06 04:28

My Android Studio was working fine till morning, but since tonight I get error saying \"Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, p

相关标签:
15条回答
  • 2020-12-06 04:59

    There are several countries that their IP's are blocked by Android Studio so if you feel your IP is one of them just simply connect to a VPN service.

    0 讨论(0)
  • 2020-12-06 04:59

    Invalidate cache & restart the android studio works for me!

    0 讨论(0)
  • 2020-12-06 05:01

    I solved it by executing cleanBuildCache in android studio

    open Gradle projects tab in the right top corner of android studio under build folder double click on cleanBuildCache and then run you project

    0 讨论(0)
  • 2020-12-06 05:06

    I think it's a network issue. My project currently fails to build unless I pass the --offline argument to gradle. I think the S3 outage is impacting repos hosting dependencies.

    Try ./gradlew tasks --offline

    Or, to make android studio run in offline mode, follow the instructions: https://stackoverflow.com/a/32173577/1043518

    0 讨论(0)
  • 2020-12-06 05:06

    This may also happen when you don't have an internet connection on the network you are connected to . the fix would be to easily get a proper internet connection and re-sync Gradle.

    0 讨论(0)
  • 2020-12-06 05:07

    It can be a network issue sometimes. You can try to resolve it by turning off your "Firewall Protection". Also you need to turn off Firewall Protection from Antivirus.

    0 讨论(0)
提交回复
热议问题