Gradle Network is unreachable: connect

1,795 views
Skip to first unread message

Steve Turner

unread,
Dec 19, 2013, 4:59:53 PM12/19/13
to adt...@googlegroups.com
Getting the following after upgrading Android Studio to 0.4.0:

Executing tasks: [::assemble]

Parallel execution is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:classpath'.
   > Could not resolve com.android.tools.build:gradle:0.7.0.
     Required by:
         MUVE:app:unspecified
         > Network is unreachable: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.233 secs

I have no issues browsing to the repo1.maven.org URL listed above, I eve downloaded the gradle-0.7.0.pom file ensure I could.

Clicking the Sync Project with Gradle Files produces the same error.

I have tried using a local gradle distribution, as well as, the default gradle wrapper (recommended) options on Gradle Setting.

Anything other ideas would be appreciated.

Thanks
-Steve

Steve Turner

unread,
Jan 3, 2014, 4:05:59 PM1/3/14
to adt...@googlegroups.com
Anybody?

Siva Velusamy

unread,
Jan 3, 2014, 5:28:19 PM1/3/14
to adt...@googlegroups.com
What happens if you run "./gradlew --info assembleDebug" from the command line?
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to adt-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Steve Turner

unread,
Jan 4, 2014, 3:52:29 PM1/4/14
to adt...@googlegroups.com
Siva,

Here is what I get:

Z:\dev\ClouDevelopment\android\MUVE>gradlew --info assembleDebug
Starting Build
Settings evaluated using settings file 'Z:\dev\ClouDevelopment\android\MUVE\sett
ings.gradle'.
Projects loaded. Root project using build file 'Z:\dev\ClouDevelopment\android\M
UVE\build.gradle'.
Included projects: [root project 'MUVE', project ':muve']
Evaluating root project 'MUVE' using build file 'Z:\dev\ClouDevelopment\android\
MUVE\build.gradle'.
Evaluating project ':muve' using build file 'Z:\dev\ClouDevelopment\android\MUVE
\muve\build.gradle'.
Error listing versions of com.android.tools.build:gradle:0.7.+ using class org.g
radle.api.internal.artifacts.repositories.resolver.MavenVersionLister$1. Will at
tempt an alternate way to list versions. This behaviour has been deprecated and
is scheduled to be removed in Gradle 2.0

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':muve'.
> Could not resolve all dependencies for configuration ':muve:classpath'.
   > Could not resolve com.android.tools.build:gradle:0.7.+.
     Required by:
         MUVE:muve:unspecified
      > Failed to list versions for com.android.tools.build:gradle:0.7.+.
         > Could not list versions using M2 pattern 'http://repo1.maven.org/mave
n2/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]
'.
            > Could not GET 'http://repo1.maven.org/maven2/com/android/tools/bui
ld/gradle/'.
               > Network is unreachable: connect

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to
get more log output.

BUILD FAILED

Total time: 2.762 secs

zetq dox

unread,
Dec 1, 2015, 11:53:44 PM12/1/15
to adt-dev
Just came across the same problem, and this command did the trick:

$ gradle --stop

then do whatever you have to do:

$ gradle assembleDebug --debug

It seems the gradle daemon is caching the network state.
Reply all
Reply to author
Forward
0 new messages