diff --git a/android/bazel_handler.go b/android/bazel_handler.go index 2ee9c4241..4a2511972 100644 --- a/android/bazel_handler.go +++ b/android/bazel_handler.go @@ -371,7 +371,11 @@ func (context *bazelContext) InvokeBazel() error { var cqueryOutput string var err error - err = os.Mkdir(absolutePath(context.intermediatesDir()), 0777) + intermediatesDirPath := absolutePath(context.intermediatesDir()) + if _, err := os.Stat(intermediatesDirPath); os.IsNotExist(err) { + err = os.Mkdir(intermediatesDirPath, 0777) + } + if err != nil { return err }