我的 android 项目的 build.gradle 文件在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21213025/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is the build.gradle file located for my android project?
提问by user3171799
回答by Binoy Babu
It will be located in the project root unless you have set a custom location. To generate a build.gradle
use eclipse and export project as build.gradle
.
除非您设置了自定义位置,否则它将位于项目根目录中。生成一个build.gradle
使用 eclipse 并将项目导出为build.gradle
.
回答by Rohan
The app level build.gradle file is located inside your project folder under app/build.gradle. for eg: if your project name is MyApplication MyApplication/app/build.gradle. At this location, you will be adding dependencies for your project. There will be one more build.gradle file under your project folder immediately in new versions( As of April 2017). But to my opinion you never play with this file.
应用级 build.gradle 文件位于 app/build.gradle 下的项目文件夹中。例如:如果您的项目名称是 MyApplication MyApplication/app/build.gradle。在此位置,您将为项目添加依赖项。在新版本(截至 2017 年 4 月)中,您的项目文件夹下会立即多出一个 build.gradle 文件。但在我看来,你从来没有玩过这个文件。
回答by Amirouche Zeggagh
The location of build.gradle (Project)is in the root project
的位置的build.gradle(项目)是根项目
and the build.gradle (app)is in the /app/build.gradle of the projet
并且 build.gradle (app)在项目的 /app/build.gradle 中