鍍金池/ 問答/網(wǎng)絡(luò)安全  HTML/ cordova在mac系統(tǒng)下不能編譯和預(yù)覽

cordova在mac系統(tǒng)下不能編譯和預(yù)覽

/usr/local/bin/cordova run --emulator android
Android Studio project detected
ANDROID_HOME=/usr/local/Caskroom/android-platform-tools/27.0.1
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
(node:24129) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for JDK 1.8 or greater
    at /Users/yinminqian/Desktop/MyApp/platforms/android/cordova/lib/check_reqs.js:370:19
    at _fulfilled (/Users/yinminqian/Desktop/MyApp/platforms/android/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/Users/yinminqian/Desktop/MyApp/platforms/android/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/Users/yinminqian/Desktop/MyApp/platforms/android/cordova/node_modules/q/q.js:816:13)
    at /Users/yinminqian/Desktop/MyApp/platforms/android/cordova/node_modules/q/q.js:624:44
    at runSingle (/Users/yinminqian/Desktop/MyApp/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/Users/yinminqian/Desktop/MyApp/platforms/android/cordova/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:112:11)
(node:24129) 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:24129) [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.

這是報(bào)錯(cuò)信息,大神看下應(yīng)該是環(huán)境的鍋嗎

回答
編輯回答
玩控

jdk 版本太高了

2017年7月9日 12:42
編輯回答
夢(mèng)囈

看起來應(yīng)該是jdk版本太高,卸載jdk9,安裝jdk8

2017年10月18日 11:25