I’m using gradle on the Android studio on mac. It worked well last week, but now has some error after updating the plugin from 2.1.3 to 2.2.0. When I try to build or clean project, the CPU usage reaches about 100% and gradle fails with the following.
"Error:Execution failed for task ‘:app:mergeReleaseFlavorDebugResources’.
java.lang.OutOfMemoryError: unable to create new native thread
I think it is not actually the OOM because there is about 10G of unused memory when it occurs.
Any wisdom will be appreciated.