简体   繁体   English

科尔多瓦无法在Android上构建

[英]Cordova can't build on android

cordova do not want to build with android. cordova不想用android构建。

It compiles under ios via Xcode. 它通过Xcode在ios下编译。

Android Studio project detected 检测到Android Studio项目

ANDROID_HOME=/Users/arthurdoreau/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
(node:61518) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for JDK 1.8 or greater
    at /Users/arthurdoreau/Documents/Deeky/platforms/android/cordova/lib/check_reqs.js:370:19
    at _fulfilled (/Users/arthurdoreau/Documents/Deeky/platforms/android/cordova/node_modules/q/q.js:854:54)
    at /Users/arthurdoreau/Documents/Deeky/platforms/android/cordova/node_modules/q/q.js:883:30
    at Promise.promise.promiseDispatch (/Users/arthurdoreau/Documents/Deeky/platforms/android/cordova/node_modules/q/q.js:816:13)
    at /Users/arthurdoreau/Documents/Deeky/platforms/android/cordova/node_modules/q/q.js:624:44
    at runSingle (/Users/arthurdoreau/Documents/Deeky/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/Users/arthurdoreau/Documents/Deeky/platforms/android/cordova/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:172:11)
(node:61518) 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:61518) [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.

The error message is saying that JDK 1.8 or greater is needed. 该错误消息表明需要JDK 1.8或更高版本。 Which JDK version are you using? 您正在使用哪个JDK版本? If you have not installed it then please install from Java website otherwise you will need to set the path of the JDK in your system paths file. 如果尚未安装,请从Java网站安装,否则,您需要在系统路径文件中设置JDK的路径。

If the issue still persists, you should uninstall all previous JDK including 1.8 then install latest JDK. 如果问题仍然存在,则应卸载所有以前的JDK(包括1.8),然后安装最新的JDK。 Although removing paths of previous JDK versions from paths variable should work too. 尽管从paths变量中删除以前的JDK版本的路径也应该起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM