Gradle Project sync error in Android Studio 2.3.3
I recently upgraded my Android studio from 2.0 to 2.3.3. But when I imported my old projects, it started showing Gradle project sync. Basic functions will not work as expected.
And the messages show:
Unknown host 'services.gradle.org'. You may need to tweak the proxy setting in Gradle.
How can I solve this?
source to share
Maybe it is due to broken gradle download, I had this problem too:
+ Download the latest gradle zip from: https://services.gradle.org/distributions
+ Extract the folder and replace it with android_studio folder (where you installed it) / gradle / the_existing_gradle_folder
Hope this helps. Thank!
source to share
Reset all configurations and try again:
Switch to.
File> Settings> Appearance and Behavior> System Settings> HTTP Proxy [In IDE Settings] Enable the following option Automatically detect proxy settings
You can also clean the project in Build-> Clean Project and File-> Invalidade Caches / Restart.
If the Gradle location is wrong, that can also cause this issue. Check:
File-> Setting-> Build, Execution, Deployment-> Build Tools -> Gradle In the Project Level section, find the Gradle directory.
The class directory is usually C: \ Users \ username.gradle on windows ...
source to share
These instructions are for Linux systems. If the problem occurred after your recent update, just point Android Studio to the gradle position you used previously. to do this go to
file -> Settings -> Build, Execution, Deployment Grade
select Gradle
. On Project level settings
select Use local gradle distribution
and select the folder where gradle was installed. Make sure to select hidden folders (most recent icon) because the gradle folder is hidden.
If you want this to be a global setting, do the same for Global Gradle settings
. Install the gradle folder there as well. Click "Apply". and you're done!
source to share