Ionic cordova build android failed

Hi when i run ionic cordova build android --prod --release on my cli it shows this error .

  • What went wrong:
    Execution failed for task ‘:processReleaseResources’. Failed to execute aapt

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

[ERROR] An error occurred while running cordova build android --release (exit
code 1).

Tried many solution and doesnt work , can someone please help . Thanks in advance


This issue is because of sdk tools Version mismatch.
The targeted sdk version in build.gradle file must match with the sdk version which you installed.
Check the versiuon of sdk on your build.gradle file
1 Like