
Question:
After removing the old android studio, I install a new one, (Beta)0.8.6. Build number:AI-135.1339820. When I try to build my project, it can't be built, the following is log:
Error:A problem occurred configuring root project 'Game'.
<blockquote>
Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.build:gradle:0.12.2. Required by: :Game:unspecified Could not GET '<a href="http://jcenter.bintray.com/com/android/tools/build/gradle/0.12.2/gradle-0.12.2.pom" rel="nofollow">http://jcenter.bintray.com/com/android/tools/build/gradle/0.12.2/gradle-0.12.2.pom</a>'. Can't connect to SOCKS proxy:Connection refused
</blockquote>Game is my project's name. I have struggled this problem with hours, but without any progress.
Answer1:It should be related to proxy settings.
Check following link to set proxy in android studio. <a href="https://stackoverflow.com/questions/18443208/androidstudio-gradle-proxy" rel="nofollow">AndroidStudio gradle proxy</a>
Answer2:Try disabling Antivirus/Internet security and if you are using Windows then windows firewall. Try rebuilding the project. It worked for me.
Answer3:You need to ensure your proxy support https. If not you can force <a href="http://www.error.report/2016/02/android-studio-failure-build-failed.html" rel="nofollow">Android Studio to fetch dependencies and AS updates using HTTP instead of HTTPS</a> (where available).