0

My android studio was running perfecly yesterday, but today when I started my android studio and want to run an app on mobile the following error occurred,

enter image description here

I searched on the internet and stackoverflow but no solution is useful

I even manually downloaded the gradle-4.6-all.zip from the gradle/distribution and pasted in ~\.gradle\wrapper\dists, but the error still there.

kindly help me with this.

M Umer
  • 353
  • 6
  • 13

1 Answers1

1

The error occurs because you don't have unzipped gradle files in ~\.gradle\wrapper\dists directory.

Extract the zipped gradle-4.6-all.zip and extract it in ~\.gradle\wrapper\dists directory.

Alternatively ,Android Studio will automatically use the Gradle wrapper and pull the correct version of Gradle. Beneath your Android Studio's project tree, open the file gradle/wrapper/gradle-wrapper.properties. Check for this entry to be:

distributionUrl=http\://services.gradle.org/distributions/gradle-4.6-all.zip

Clean rebuild the project.

Download Link for Gradle Versions: http://services.gradle.org/distributions/

References:Manually install Gradle and use it in Android Studio

Sheetal gupta
  • 191
  • 1
  • 10
  • I already did this, I manually downloaded the same version of gradle mentioned in wrapper.properties, I also extacted the files in the dists directory, but the error still there. – M Umer Dec 09 '18 at 06:43