Hamza
Hamza

Reputation: 2045

"failed to resolve x" errors after updating to Android studio to 2.2

Google launched Android Studio 2.2, so I updated my Android studio 2.1 to Android Studio 2.2 When i make a Project I get these errors (and more):

Error:Failed to resolve: javax.inject:javax.inject:1

Error:Failed to resolve: com.google.code.findbugs:jsr305:2.0.1

Error:Failed to resolve: javax.annotation:javax.annotation-api:1.2

Error after updating android studio

Upvotes: 0

Views: 3337

Answers (2)

George Theodorakis
George Theodorakis

Reputation: 112

I had the same problem and it turned to be that my proxy settings changed. That was why I couldn't connect and download any libs.

You can check it at File -> Settings -> System Settings dropdown -> HTTP Proxy.

Or

in gradle.properties at project level:

systemProp.https.nonProxyHosts=*.yourdomain.com, 192.168.*
systemProp.https.proxyPort=yourPort (ex.  8080)
systemProp.http.proxyHost=xx.xx.xx.xx
systemProp.http.nonProxyHosts=*.yourdomain.com, 192.168.*
systemProp.https.proxyHost=xx.xx.xx.xx
systemProp.http.proxyPort=yourPort (ex.  8080)

Upvotes: 0

Faiizii Awan
Faiizii Awan

Reputation: 1710

I have recently installed 2.2 version of Android Studio and I am also facing this problem. But don't worry just follow the following simple steps.

  1. Connect your computer to internet
  2. Refresh your project (option is in menu strip)
  3. Clean your project (option in build menu)
  4. And again refresh your project. This will hopefully resolve this issue.
  5. Again sync your project (if still facing this issue)

Upvotes: 4

Related Questions