Error after CMD: ionic cordova build android --prod --release

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not update C:\Users\AKKAOUI.gradle\caches\4.1\file-changes\last-build.bin

C:\Users\AKKAOUI.gradle\caches\4.1\file-changes\last-build.bin (Acc�s refus�)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

BUILD FAILED in 9m 20s

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not write cache value to ‘C:\Users\AKKAOUI.gradle\daemon\4.1\registry.bin’.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org
    cmd: Command failed with exit code 1 Error output:
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

Picked up _JAVA_OPTIONS: -Xmx512M

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not update C:\Users\AKKAOUI.gradle\caches\4.1\file-changes\last-build.bin

C:\Users\AKKAOUI.gradle\caches\4.1\file-changes\last-build.bin (Acc�s refus�)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

BUILD FAILED in 9m 20s

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not write cache value to ‘C:\Users\AKKAOUI.gradle\daemon\4.1\registry.bin’.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org
    Picked up _JAVA_OPTIONS: -Xmx512M
    [ERROR] An error occurred while running subprocess cordova.

      cordova build android --release -- --gradleArg=-PcdvBuildMultipleApks=true exited with exit code 1.
    
      Re-running this command with the --verbose flag may provide more information.