0

How can I resolve this error?

Failed to import new Gradle project: Could not fetch model of type 'IdeaProject' using Gradle distribution. A problem occurred configuring project ':MyApplication2'. A problem occurred configuring project ':MyApplication2'. Could not resolve all dependencies for configuration ':MyApplication2:classpath'.
Could not resolve com.android.tools.build:gradle:0.4. Required by:
MyApplication2Project:MyApplication2:unspecified Could not GET. repo1.maven.org

Consult IDE log for more details (Help | Show Log)

Leigh
  • 28,765
  • 10
  • 55
  • 103
  • Are you under a proxy?, apparently this is a known issue under a proxy, can you check your settings? – ah008a Jul 12 '13 at 05:07
  • Try the URL outside Android Studio to see if you can get to it: http://repo1.maven.org/maven2/com/android/tools/build/gradle/0.4/gradle-0.4.pom – ah008a Jul 12 '13 at 05:08
  • the problem with voting to close this as a duplicate is that it looks to me as if the answer provided below doesn't match the answer on the duplicate. So according to the rules, if the proposed duplicate does not answer the question, we are meant to re-ask the question. – Richard Le Mesurier Mar 01 '14 at 11:05

1 Answers1

1

Ok well apparently you are under a proxy, and its not configured in Android Studio try:

  1. go to your .gradle installation directory .gradle (usually on your home or user folder)
  2. Create/modify gradle.properties file with this config (change according to your settings):

    systemProp.http.proxyHost=myProxyIP systemProp.http.proxyPort=80 systemProp.http.proxyUser=04090 systemProp.http.proxyPassword=myPassWord systemProp.http.nonProxyHosts=.nonproxyrepos.com|localhost systemProp.https.proxyHost=myProxyIP systemProp.https.proxyPort=80 systemProp.https.proxyUser=04090 systemProp.https.proxyPassword=myPassWord systemProp.https.nonProxyHosts=.nonproxyrepos.com|localhost

  3. Restart Android Studio.

Hope it helps...

ah008a
  • 1,115
  • 6
  • 11