How to regenerate build.gradle file after deleting

2019-08-12 07:23发布

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?

1条回答
Rolldiameter
2楼-- · 2019-08-12 08:08

Open your IDE and just create a file called build.gradlein 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.

查看更多
登录 后发表回答