I am trying to build a quasar cordova app for Android. when I run the command quasar dev -m cordova -T android
I get the error:
Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=C:\Users\myUserName\AppData\Local\Android\Sdk (recommended setting) ANDROID_HOME=C:\Users\myUserName\AppData\Local\Android\Sdk (DEPRECATED) Requirements check failed for JDK 1.8.x! Detected version: 3.0.0 Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.
App · Command "cordova" failed with exit code: 1 App · Updated Cordova config.xml App · ⚠️ [FAIL] Cordova CLI has failed
It says I need JDK 1.8.x, but it detected 3.0.0. But I am pretty sure I have JDK 1.8 installed, when I run the bash shell command java -version
I get:
Picked up JAVA_TOOL_OPTIONS: -Xmx3g -Xms2g java version "1.8.0_291" Java(TM) SE Runtime Environment (build 1.8.0_291-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
at C:\Program Files\Java I have two folders: jdk1.8.0_291 and jre.18.0_291
my JAVA_HOME environment variable is set to C:\Program Files\Java\jdk1.8.0_291
I have no idea why I can't get the app to build. Please help!
I had the environment variable JAVA_TOOL_OPTIONS set to something. After clearing the variable and trying again, everything worked. I read it may be due to the regex used by Execa failing to detect the correct version when using JAVA_TOOL_OPTIONS.