Error when building an apk in ionic

Hi.
After some time not using Ionic. Today I have decided to create an apk but the following error ocurred to me. I have installed jdk and the first step goes right, but the second shows me an error. Here the error. Thank in advance for your help.

Steps:

  1. ionic cordova run android --prod --release
  2. ionic cordova build android --prod --release