簡體   English   中英

科爾多瓦無法在Android上構建

[英]Cordova can't build on android

cordova不想用android構建。

它通過Xcode在ios下編譯。

檢測到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.

該錯誤消息表明需要JDK 1.8或更高版本。 您正在使用哪個JDK版本? 如果尚未安裝,請從Java網站安裝,否則,您需要在系統路徑文件中設置JDK的路徑。

如果問題仍然存在,則應卸載所有以前的JDK(包括1.8),然后安裝最新的JDK。 盡管從paths變量中刪除以前的JDK版本的路徑也應該起作用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM