Error while deploying debug apk

I was trying to deploy to device for debug.

I tried to do ionic cordova prepare android and then ionic cordova run android in an ionic4 project directory. I had this error

My phone is Android 6

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
 
20 actionable tasks: 1 executed, 19 up-to-date
BUILD FAILED in 1m 3s
c:\wamp64\www\ionicApps\myApp\platforms\android\gradlew: Command failed with ex
it code 1 Error output:
FAILURE: Build failed with an exception.
 
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.
Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows Daemon #2: Daemon star
tup failed
  This should not happen under normal circumstances, please file an issue if it
does.
 
* 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
 
BUILD FAILED in 1m 3s
[ERROR] An error occurred while running subprocess cordova.
 
        cordova.cmd build android --device exited with exit code 1.
 
        Re-running this command with the --verbose flag may provide more
        information.

Please help…
The thing that I noticed is
c:\wamp64\www\ionicApps\myApp\platforms\android**gradlew:**<= this folder doesn’t even exist in my project

The gradle is a aplication independent… If is not installed, install…

Read more -> https://gradle.org/install/

if dont work!

Try removing this two folders platforms and www… This are created when your build the code…

If this not help… See the gradle are installed in your pc…

:wink: