在android studio中更改gradle构建目录? [英] Change gradle build directory in android studio?
本文介绍了在android studio中更改gradle构建目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚安装了 Android Studio,我刚刚在学习使用 Gradle 进行构建.但是,使用默认项目设置,我的构建位于项目目录中,我希望将它们放置在其他地方(最好在项目目录之外).有可能实现这一目标吗?我在哪里进行更改以及我要进行哪些更改?
I just installed Android Studio and I am just learning to build using Gradle. However, with the default project setup, my builds are located in the project directory and I would like to have them placed elsewhere (preferably outside of the project directory). Is it possible to achieve this? Where do I make a change and what change do I make?
推荐答案
in root build.gradle
allprojects {
buildDir = "/path/to/build/${rootProject.name}/${project.name}"
}
和文档 https://gradle.org/docs/current/userguide/writing_build_scripts.html
这篇关于在android studio中更改gradle构建目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文