I just create a new Project in the android studio and add gcm module to it.
and I keep giving this error message
Error:Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
and I do not use any proxy.
can anyone help me about this?
Update
now after rebuild my project i give this error
Error:A problem occurred configuring project ':app'.
A problem occurred configuring project ':backend'.
Could not resolve all dependencies for configuration ':backend:classpath'.
Could not resolve com.google.appengine:gradle-appengine-plugin:1.9.18.
Required by:
PushStart:backend:unspecified
Could not resolve com.google.appengine:gradle-appengine-plugin:1.9.18.
Could not get resource 'https://jcenter.bintray.com/com/google/appengine/gradle-appengine-plugin/1.9.18/gradle-appengine-plugin-1.9.18.pom'.
Could not GET 'https://jcenter.bintray.com/com/google/appengine/gradle-appengine-plugin/1.9.18/gradle-appengine-plugin-1.9.18.pom'.
Connection to https://jcenter.bintray.com refused
If you encounter these errors even without proxy or if you have downloaded a source code and unable to compile it, follow these steps:
1- Create another empty project
2- Go to
File\Project Structure\project
and take note Gradle Version and Android Plugin Version3- go back to the Troubled project and use same Versions in previous path. sometimes needed to change both jcenter to mavenCentral too
4- in the Project Structure Window go
app\properties
and change Compile Sdk Version to Latest Version.5- I recommend change the Target Sdk Version to latest version too (in the
Flavors tab
)6- Sync, Clean and Rebuild project.
Now, the problem with gradle compiler is resolved, You may encounter with some errors about dependencies. These problems usually resolve with updating dependencies. for update dependencies to latest version use this guide provided by @Jared Kells
The answer from this SO post might help you.
You should add the below lines in the
gradle.properties
file for the https setings configurationif you are behind proxy and your proxy is not configured in android studio, you should do below link: Error:Connection timed out: connect
and if you are configured your proxy setting or your issue is not related to proxy, you have to update your sdk handily by below path: tools>android>sdk manager>sdk tools> check any thing you need and click on OK, then your sdk become update and then click on syncrow or Try Again button.
If you are on Win7, then your Firewall blocks Android studio from connecting. You will have to add android studio to the trusted files and bingo! everything will start working!!
Just try Invalidate Caches.. Goto File->Invalidate Caches/Restart->Choose "Invalidate and Restart".