Here is the error:
capacitor.cmd run android --no-sync --target ZY22H2NXDQ
[capacitor] × Running Gradle build - failed!
[capacitor] [error]
[capacitor] ERROR: JAVA_HOME is not set and no ‘java’ command could be found in your PATH.
[capacitor]
[capacitor] Please set the JAVA_HOME variable in your environment to match the
[capacitor] location of your Java installation.
[capacitor]
[ERROR] An error occurred while running subprocess capacitor…
My JAVA_HOME var is set to: C:\Program Files (x86)\Common Files\Oracle\Java\javapath
Any ideas what is causing this error? Or how to troubleshoot it?
Thanks.