How to regenerate build.gradle file after deleting

巧了我就是萌 提交于 2019-12-11 10:54:15

问题


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:


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.



来源:https://stackoverflow.com/questions/32307280/how-to-regenerate-build-gradle-file-after-deleting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!