Gradle project sync failed. Android Studio

六月ゝ 毕业季﹏ 提交于 2019-12-23 05:25:22

问题


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

回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/25614492/gradle-project-sync-failed-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!