gpt4 book ai didi

android - Cordova:检查需求时崩溃

转载 作者:行者123 更新时间:2023-11-30 00:02:52 24 4
gpt4 key购买 nike

我使用 cordova 需求来检查我是否可以为 Android 构建。它崩溃了,退出代码为 1,它说我的 Android 目标没有安装。

这是我的输出:

cordova requirements
Android Studio project detected

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
cmd: Command failed with exit code 1 Error output:
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:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 5 more
Gradle: installed G:\Program Files\Android\gradle\gradle-4.1\bin\gradle

Requirements check results for browser:
(node:10036) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'forEach' of undefined
at C:\Users\jgols\AppData\Roaming\npm\node_modules\cordova\src\cli.js:397:35
at Array.map (<anonymous>)
at C:\Users\jgols\AppData\Roaming\npm\node_modules\cordova\src\cli.js:388:68
at _fulfilled (C:\Users\jgols\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\jgols\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\jgols\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\jgols\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\jgols\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at process._tickCallback (internal/process/next_tick.js:150:11)
(node:10036) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10036) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

我已经尝试研究两者,但我似乎无法修复崩溃,因为我没有找到具有相同错误的类似线程。如何修复崩溃以及如何声明我的 Android 目标?

最佳答案

不是你。这是一个 Cordova 错误:

https://issues.apache.org/jira/browse/CB-13740

关于android - Cordova:检查需求时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49577623/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com