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
You just need to reimport your project it will by default create the new gradle folder