0T0K0-Tensh1 commented on issue #1554:
URL:
https://github.com/apache/cordova-android/issues/1554#issuecomment-1418274699
that info was somewhat helpful but didn't resolve my issue.
tl;dr post below, please read it first.
1st-ly,
the `<android-studio-root>/jre` path does not contain anything but an empty
file named .marker
2nd
`_\Cordova>_cordova requirements android`
now gives
`Android target: not installed
Command failed with exit code 1: avdmanager list target`
like so:
```
_\Cordova>_cordova requirements android
Requirements check results for android:
Java JDK: installed 11.0.18
Android SDK: installed true
**Android target: not installed**
**Command failed with exit code 1: avdmanager list target**
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/xml/bind/annotation/XmlSchema
at
com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at
com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at
com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException:
javax.xml.bind.annotation.XmlSchema
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
Gradle: installed \AndroidDev\gradle-7.6\bin\gradle.BAT
Some of requirements check failed
```
i also tried to import to my quasar project but got a different error
talking about gradle and version 8? it seems to be able to find the apk that
cordova cant for some reason. but I'm not sure if it is cordova or quasar
building it. afaik it has to be cordova since quasar is using it in the first
place?
(the venv is an unrelated python environment for script commands.)
if true, it made me think that there is a problem with cordova's handling of
params.
running the commands above and below only work in the cordova environment i
defined in a .bat file (see below). without that, quasar works fine, but cannot
boot cordova.
```
quasar mode add cordova
App • ⚠ Cordova support detected already. Aborting.
_\quasar-project>_cordova platform ls
Current working directory is not a Cordova-based project.
_\quasar-project>_quasar dev --mode cordova --target android
.d88888b.
d88P" "Y88b
888 888
888 888 888 888 8888b. .d8888b 8888b. 888d888
888 888 888 888 "88b 88K "88b 888P"
888 Y8b 888 888 888 .d888888 "Y8888b. .d888888 888
Y88b.Y8b88P Y88b 888 888 888 X88 888 888 888
"Y888888" "Y88888 "Y888888 88888P' "Y888888 888
Y8b
? What external IP should Quasar use? (Use arrow keys)
App • Updated Cordova config.xml
App • Running "cordova run android" in
\AndroidDev\Apps\Quasar\quasar-project\src-cordova
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=<path-to-sdk> (recommended setting)
ANDROID_HOME=\AndroidDev\SDK (DEPRECATED)
Using Android SDK: \AndroidDev\SDK
Deprecated Gradle features were used in this build, making it incompatible
with Gradle 8.0.
> Starting Daemon
You can use '--warning-mode all' to show the individual deprecation warnings
and determine if they come from your own scripts or plugins.
See
https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 25s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)
Warning: Mapping new ns
http://schemas.android.com/repository/android/common/02 to old ns
http://schemas.android.com/repository/android/common/01
...
Warning: unexpected element (uri:"", local:"base-extension"). Expected
elements are <{}codename>,<{}layoutlib>,<{}api-level>
> Task :CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Deprecated Gradle features were used in this build, making it incompatible
with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings
and determine if they come from your own scripts or plugins.
See
https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 1m 31s
48 actionable tasks: 48 executed
**Built the following apk(s):**
\AndroidDev\Apps\Quasar\quasar-project\src-cordova\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=\AndroidDev\SDK (recommended setting)
ANDROID_HOME=\AndroidDev\SDK (DEPRECATED)
Using Android SDK: \AndroidDev\SDK
Command failed with exit code 1: apkanalyzer manifest target-sdk
\AndroidDev\Apps\Quasar\quasar-project\src-cordova\platforms\android\app\build\outputs\apk\debug\app-debug.apk
**'sh' is not recognized as an internal or external command,**
operable program or batch file.
App • Command "cordova" failed with exit code: 1
App • Updated Cordova config.xml
App • ⚠ FAIL Cordova CLI has failed
```
it also asked me "what is the cordova id" and i just hit enter, but the
next 2 times (2nd time in cordova environment above) i didn't get that option,
so im wondering if i need to define it.
the bat looks like this
```@echo off
set "ANDROID_HOME=D:\AndroidDev\SDK"
set "JAVA_HOME=C:\Program Files\Java\jdk-11"
set "GRADLE_HOME=D:\AndroidProject\.gradle"
start "" /D"D:\Cordova\" /B cmd.exe /k D:\Cordova\venv_\Scripts\activate.bat
/B
cls
```
.bat gives these vars when asked
```
ANDROID_SDK_ROOT:
D:\AndroidDev\SDK
JAVA_HOME:
C:\Program Files\Java\jdk-11
GRADLE_HOME: D:\AndroidProject\.gradle
```
even with the GRADELE_HOME unset, like so:

it changed nothing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]