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

Open
#449 10 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
android, java

Research direction

Start with the PackageAndroidResources action and the _run method in java.bzl, then inspect the referenced helper.bzl location and ResourceLinker batching behavior. Reproduce the Too many open files failure on a large codebase and compare it with the working ulimit and batch-merging approaches. Done means Android resource packaging completes without exceeding the file descriptor limit.

Written by the indexing model from the issue text.

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.
  • Adjusting the ResourceLinker to merge .zip files in batches.

Dev env. and tools:

Dominant language
Java
Stars
205
Forks
113
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bazelbuild/rules_android

All issues in bazelbuild/rules_android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.