I blame Jebediah for when stuff blows up , he ' s the master of kaboom . <| sep |> Actually it does . In fact , the wrong javaMaxHeapSize setting can stop dex in process from running at all and most people won ' t even notice unless they look closely at their Gradle console messages . They ' ll just be annoyed that it ' s so slow . If you have your Gradle max set to 4 GB , and javaMaxHeapSize 4 g , you will see a message inside your Gradle console that looks like the following To run dex in process , the Gradle daemon needs a larger heap . It currently has approximately 4096 MB . For faster builds , increase the maximum heap size for the Gradle daemon to more than 5120 MB . Your build will still run happily , albeit quite a bit slower than it should , because dex in process did not run . There ' s two ways to fix this 1 . Change your Gradle max to Xmx 5120 m 2 . Leave Gradle max at Xmx 4096 m but change your project ' s javaMaxHeapSize to 3 gDepending on your machine specs and your project size , changing the javaMaxHeapSize to a smaller value is often a better option than increasing how much RAM Gradle can use . As a general rule , setting the javaMaxHeapSize to 1 GB less than your Gradle maximum will give you the fastest builds . Without this 1 GB buffer , dex in process will disable itself for the build , and you will see the message above in your Gradle console .