bazelbuild / bazelbuild/rules_android

ERROR: Packaging Android Resources in <target> failed: (Exit 1)

Open
#449 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
203
Forks
95
PR merge metrics
No merged PRs in 30d

Description

When using rules_android 0.7.1 on a big codebase, we are getting an error `Too many open files`. Happens on the PackageAndroidResources action.

Things we have tried (didn't work):
* Added `-XX:+MaxFDLimit` to the `jvm_flags` in java.bzl's _run method.

Things we have tried (worked for is):
* Calling `ulimit -n 65536` [here](https://github.com/bazelbuild/rules_android/blob/db71ce36babffbd24fde63fc82c80c8980221dfa/rules/android_sdk_repository/helper.bzl#L332).
* Adjusting the `ResourceLinker` to merge .zip files in batches.

Dev env. and tools:
* Using patched bazel 7.7.1
* Using rules_android 0.7.1 (including this patch: https://github.com/Bencodes/rules_android/commit/cc2c8264b24b4dfb8c12be7738c1eba4662091e6).
* OS: Tahoe 26.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.