0

I have Android studio 8.6 Gradle plugin 0.12.2 JDK SE Version 7 Update 67

In Android studio, a bar pops up that says "Grade project sync failed." The message box says "Error:Permission denied: connect" I turned the firewall off and I still get the same error.

I have tried everything I can think of. Can anyone help me?

Here is the idea log

https://code.google.com/p/android/issues/attachmentText?id=75520&aid=755200001000&name=idea.log&token=ABZ6GAdMX-o6HMm5QfRzUo_FPCDpZxKGww%3A1409629650650

Here is part of the Gradle daemon log with full log in link.

https://code.google.com/p/android/issues/attachmentText?id=75520&aid=755200002000&name=daemon-5360.out.log&token=ABZ6GAdW5VYzeuv3iYeE7U-HkfF4xTh5dg%3A1409631833795

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'MyApplication'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:0.12.2.
     Required by:
         :MyApplication:unspecified
      > Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/0.12.2/gradle-0.12.2.pom'.
         > Permission denied: connect

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

BUILD FAILED
Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
DarinL
  • 39
  • 1
  • 6
  • 1
    Sounds like a networking/firewall problem. – Peter Niederwieser Sep 02 '14 at 01:27
  • Have you tried running Gradle with the `--stacktrace`, `--info`, or `--debug` options as it suggests? In case you're unsure on how to do this, see [Using the Gradle Command-Line](http://www.gradle.org/docs/current/userguide/tutorial_gradle_command_line.html). – Yep_It's_Me Sep 03 '14 at 05:42

2 Answers2

3

I don't know what happened but now it works.

DarinL
  • 39
  • 1
  • 6
0

It's seems like some complicated network situation caused that.If it happens again,try set the http proxy in setting.

royorange
  • 31
  • 3
  • Welcome to Stack Overflow! This should be a comment, not an answer. You can [leave a comment](http://stackoverflow.com/help/privileges/comment) once you [earn](http://meta.stackexchange.com/questions/146472/what-is-the-best-way-to-increase-my-reputation-and-privileges) enough [reputation](http://stackoverflow.com/help/whats-reputation). – Maximilian Ast Feb 10 '17 at 07:39