Reputation: 658
I'm running CI builds in a very resource-constrained Docker container.
AAPT2 doesn't seem to recognize that it's running in a container and spawns multiple daemon processes which then killed due to OOM and build fails:
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #0: Unexpectedly exit.
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #6: Unexpectedly exit.
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #3: Unexpectedly exit.
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #4: Unexpectedly exit.
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #2: Unexpectedly exit.
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #7: Unexpectedly exit.
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #1: Unexpectedly exit.
AAPT2 aapt2-3.3.0-beta01-5013011-linux Daemon #5: Unexpectedly exit.
Is there any way to disable AAPT2 daemon or at least limit the number of daemon processes? The Android Developer documentation doesn't seem to have any information about the AAPT2 daemon.
Upvotes: 6
Views: 884
Reputation: 7532
It's a known issue currently in the android plugin. Follow this issue on issue tracker to keep updated: https://issuetracker.google.com/117486770
Upvotes: 1
Reputation: 12583
You can temporarily add below line inside gradle.properties
.
android.enableAapt2=false
Upvotes: 0