Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Some more details are here (in Japanese)

Students have their projects on the network drive. To optimise build time, we want to put build dir on the local drive. However, we cannot have separate source dirs and build dirs due to the following bug:

An workaround is to turn off AAPT2 (which is discouraged and will not be usable after 2019).

Anyway, the following will do that:

  1. $GRADLE_USER_HOME/init.gradle (in my case: c:/android/.gradle/init.gradle)
gradle.projectsLoaded {
    rootProject.allprojects {
        buildDir = "c:/android/build/${}/${}"

(C:/Users/keigoi/.gradle/ に置きたい)

  1. Disable Instant run in Android Studio settings

try: creating junction to local dir: e.g. Z:/AndroidStudioProjects/build <=> C:/android/build (admin priviledge required)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.