4

I don't understand the error message I got, or how to resolve it. When I am trying to build my project, I see the following error:

FAILURE: Build failed with an exception.

What went wrong: A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
     :android:unspecified
   Failed to list versions for com.android.tools.build:gradle.
      Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
         Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml'.
            The target server failed to respond

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

I'm using Cordova with the Ionic framework.

J Richard Snape
  • 20,116
  • 5
  • 51
  • 79
Chengliang Xu
  • 41
  • 1
  • 3
  • 1
    Welcome to Stack overflow! Your question came to me in a review queue to help improve questions. I've done some of this: corrected formatting (see [editing help](http://stackoverflow.com/editing-help)), along with title and grammar ***To really make it answerable*** you need to show what else you've done (e.g. followed the advice to run with `--info`, `--stacktrace`, `--debug` or [checked this similar question](http://stackoverflow.com/questions/16626026/) and why that hasn't helped. Good luck! – J Richard Snape Mar 16 '15 at 13:21
  • Very thank you for your help.it's already fixed. I wried the function in the answer. should I close the question or do somethingelse? – Chengliang Xu Mar 16 '15 at 13:57
  • No problem. Posting an answer is the right thing to do. No need to put the thank you to me in the actual answer, although I appreciate your comment :) Just edit your answer to say something like: "In my case, the problem was solved by updating my SDK and then rebooting. It may have been that the original error (target server failed to respond) was a network error, or the SDK update may have solved it" – J Richard Snape Mar 16 '15 at 14:10

3 Answers3

1

This is a Java SSL connection error I solved on Github here.

You need to add the appropriate SSL certificate to the java keystore for java accept the connection.

Work fine :)

Pierre C.
  • 1,591
  • 2
  • 16
  • 29
0

already fixed. @J Richard Snape thank you for your help with my question. I updated my sdk and reboot my pc. it's worked. it looks like is the network isuue.

Chengliang Xu
  • 41
  • 1
  • 3
0

On my case it was because I was behind a proxy. After I connected on a open network, it worked fine.

Fabio Nolasco
  • 7,122
  • 6
  • 35
  • 32