AD

Android Studio gradle sync error


I got gradle sync error when building android app in android studio.

Error message:
     No subject alternative DNS name matching services.gradle.org found



Here is my gradle-wrapper.properties in "project\gradle\wrapper"
-----------------------------------------------------------------
 #Sat Sep 21 13:08:26 CEST 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
------------------------------------------------------------------

Seems gradle sync failed because it could not  resolve the dns name.

And I fix by using local gradle distibution

1.download gradle-2.2.1-all.zip and extract it

2.Open File->Settings in Android studio 

3.use local gradle distibution



4.Open File-> Project Structure in Android studio


沒有留言:

張貼留言