Error while building apk.Who is getting this error.How can I fix this error?

```
 Execution failed for task ':app:packageDebug'.
    > A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
       > java.lang.OutOfMemoryError (no error message)

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

```