GC overhead limit exceeded when building android source

前端 未结 2 449
长发绾君心
长发绾君心 2021-01-01 04:10
****[ 35% 11837/33004] build out/target/common/obj/JAVA_LIBRARIES/sdk_v21_intermediates/classes.jack 
FAILED:/bin/bash -c
\"
(mkdir -p out/target/common/obj/
相关标签:
2条回答
  • 2021-01-01 04:49

    Google recommends minimum 16GB of RAM for building source code and we have experienced that with Android N it is indeed mandatory.

    Unless 16 GB of RAM is given to machine, reliability of source code build is really really low. You may try multiple configurations of jack-server and parameters but none of them may prove to be a reliable.

    This is running thread of similar problems faced by many :- https://code.google.com/p/android/issues/detail?id=194027

    I hope this helps !

    0 讨论(0)
  • 2021-01-01 04:59

    Seems like a bug in Android makefiles - 3500 megabytes is really not enough to build some Java packages inside Android. It's hardcoded value, you can find it in build/core/config.mk. For now you can simply increase it locally (however it's weird that it isn't placed in some environment variable).

    I've increased it to 5500 megabytes and it works like a charm.

    0 讨论(0)
提交回复
热议问题