I've had a lot of applications left alone and given up because they got a lot of libraries and classes so eventually I got this memory error. Recently I started using JProfiler. But still didn't help not to cause it the app got a little big and now again this happend. Check out my setting:
in gradle.properties
org.gradle.jvmargs=-Xmx16g -XX:MaxPermSize=16g -XX:+HeapDumpOnOutOfMemoryError
GRADLE_OPTS=-Xmx16g
in gradle(app)
dexOptions { javaMaxHeapSize "16g" }
it sounds like these values don't make no difference give them 1G or 100G.T his is not important then what is?T here's a committed size in JProfiler it's only 230 MB. Before even running the App 80MB is used already! Check out the pictures:
This committed size is where the Out-Of-Memory error happens. As you see in the pictures. This happens when I press the run button and it doesn't run it gives the memory error but in the mean time in JProfiler the used size gets close to committed size and when it's close enough boom the error comes. How to increase this committed size then?It's not my device left memory that is around 1.55 GB now. Then what is it? I'm not supposed to create a hello world application. I wrote totally clean code and I'm not causing this the app worked perfectly nothing's slow nothing gets overflowed. But when I add more libraries not even using them yet! I get memory error. Here's the heap walker:
looks pretty normal to me.char and String are at the top what do I do?Please help me. Thank you!