Expiring Daemon because JVM heap space is exhausted

Hi,
I’m tryng to build, for the platform Android, an Ionic app that uses FirebaseX, but I’ve this error:

> Task :app:processReleaseGoogleServices
Parsing json file: C:\myapp\platforms\android\app\google-services.json

> Task :app:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:lintVitalRelease
C:\myapp\platforms\android\app\src\main\res\drawable-land-hdpi\screen.png: Error: The drawable "screen" in drawable-land-hdpi has no declaration in the base drawable folder
...
12 errors, 0 warnings
Expiring Daemon because JVM heap space is exhausted
Daemon will be stopped at the end of the build after running out of JVM memory
Expiring Daemon because JVM heap space is exhausted
Expiring Daemon because JVM heap space is exhausted

> Task :app:mergeExtDexRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeExtDexRelease'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > 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.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 4m 13s
43 actionable tasks: 43 executed
Expiring Daemon because JVM heap space is exhausted
Command failed with exit code 1: C:\myapp\platforms\android\gradlew cdvBuildRelease -b C:\myapp\platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android --release exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

How can I solve this problem?

Thank you

cld