I got an error with my Android project: Gradle project sync failed error
, and then I searched the solution here. However, I deleted wrong file(build.gradle instead of .gradle in the user home directory). So how do I generate build.gradle file in Android Studio again?
Asked
Active
Viewed 4,646 times
1

Community
- 1
- 1

DinhNgocHien
- 707
- 3
- 17
- 34
1 Answers
5
Open your IDE and just create a file called build.gradle
in the root folder if you deleted the top-level file, or inside a module if you deleted it.
It is a text file where you have to write your script.
You can copy the standard configuration, just copying from a new project. Of course you have to customize your file with your dependencies and your configuration.

Gabriele Mariotti
- 320,139
- 94
- 887
- 841