Outofmemory issue on windows


(kiranduggirala) #1

Hi!

Iam trying to build my project in windows machine, i have around 1500 source files to be compiled and gradle is giving outofmemory error. I tried to build by setting the GRADLE_OPTS variable like below, but still it is giving the same error.

however iam able to build on linux machine…

‘gradle -D GRADLE_OPTS="-Xmx2048m -Xms256m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError" clean build’

Can anybody help me on this?

Regards, Kiran


(Magnus Rundberget) #2

You are trying to set an environment variable using the syntaks of a system property. Try first setting the environment variable set GRADLE_OPTS=… Xmx etc Or edit your gradle.bat file and seup the gradle_opts there if you’d like :slight_smile:

Cheers

Magnus