After executing an upgrade gradle from Android Studio after
ionic capacitor build android --prod command to make a signed release, now when trying to
execute ionic cap run android -l --external the process ends with this error:
[capacitor] A problem occurred evaluating project ':app'. [capacitor] > Failed to apply plugin 'com.android.internal.application'. [capacitor] > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. [capacitor] You can try some of the following options: [capacitor] - changing the IDE settings. [capacitor] - changing the JAVA_HOME environment variable. [capacitor] - changing `org.gradle.java.home` in `gradle.properties`.
Gradle settings in Android Studio is set to Java 11. I don’t know where to look to solve this.