title: Could not find method dexOptions() for argument
body: <p>I am generating an app for testing but in the end it displays the error java.lang.OutOfMemoryError: GC overhead limit exceeded error.<br>
  To fix this issue I followed the solution on this <a href="https://stackoverflow.com/questions/25006075/extremely-long-build-with-gradle-android-studio/25006428#25006428">link</a>.<br>
  And I have added this line of code in module build.gradle file<br></p>
  
  <pre><code>dexOptions{
      incremental true
      javaMaxHeapSize "2g"
  }
  </code></pre>
  
  <p>But now it throws another error which says <br></p>
  
  <pre><code>Gradle sync failed: Could not find method dexOptions() for arguments [build_abwf3h5ru8za0j4597zvncj35$_run_closure2@30ed1096] on project ':app' of type org.gradle.api.Project.
          Consult IDE log for more details (Help | Show Log)
  </code></pre>
  
  <p><br>
  Can you help me to fix this issue ?<br>
  Thank you.</p>