I am getting the following error :
\'C:\\Users\\install\\Desktop\\project\\CoMpC2\\gradle\\wrapper\\gradle-wrapper.properties\'.
No value with key \'distribu
I had the same / a similar issue. Ideally we should not have to make any changes & Android Studio handles these things automatically.
For some reason some of my configuration got corrupted because of which every time I created a project it failed with these errors and was only putting the Gradle folder in the Project hierarchy and not generating any of the project files.
All I did was delete the .gradle, .android, .AndroidStudiox.x folder in this location: C:\Users\username and the next time I loaded Android Studio it reconfigured those dependencies and got rid of the error.
C:\Users\[Username]\.AndroidStudio4.0\system\ and delete the caches folder.
After this, create new project and the problem goes away.
It seems like the distributionUrl is missing in gradle-wrapper.properties of your project. It is shown below:
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip
Go to C:\Users\\[Username]\\.AndroidStudio4.0\system\
and delete the caches
folder.
After this, create new project and the problem goes away.
This answer is just an new version of Alok Gupta's Answer
#Tue Oct 16 17:39:45 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
copy above code inside gradle-wrapper.properties file.
While the project is loaded in android studio, go to File then Settings. Under Settings window choose Build,Execution, Deployment then under build tools choose gradle. Click on use local gradle distribution. Change gradle home by browsing gradle location eg.C:/Program Files/Android/Android Studio2/gradle/gradle-2.10