When I was trying to solve an issue with Android Studio I accidentally deleted .Gradle folder at the top of the project and build.gradle from within the app. I will post a scree
If your are not using a VCS:
try use the local history to recovery the build.gradle
file in your root folder (right click on the root folder)
If it fails. you can create a new project and copy the build.gradle
. Usually this file contains generic info (like android gradle pluging and the repos to be used in the modules)
the .gradle
folder is not a problem. Gradle wrapper will recreate this file