Gradle build error

after running command ionic cap run android -l --external

i think this is a gradle version error

please help me dear @mhartington

  1. You do not need to @ me. I will see the post.

  2. The error message is right in the output.

“Android Gradle plugins requires Java 11 to run. You are currently using Java 1.8.”

You need to update your java version.