我安装了最新的Android Studio(适用于Mac的3.0.1)。
我安装了最新的JDK(jdk-10)。
我安装了最新的Node(9.8.0)。
我安装了最新的Cordova(8.0.0)。
当我尝试“cordova run android”时,我明白了:
(node:1972) UnhandledPromiseRejectionWarning: CordovaError: Requirements check failed for JDK 1.8 or greater
at /Users/richardeng/PharoJSmobile/platforms/android/cordova/lib/check_reqs.js:370:19
at _fulfilled (/Users/richardeng/PharoJSmobile/platforms/android/cordova/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/Users/richardeng/PharoJSmobile/platforms/android/cordova/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/Users/richardeng/PharoJSmobile/platforms/android/cordova/node_modules/q/q.js:816:13)
at /Users/richardeng/PharoJSmobile/platforms/android/cordova/node_modules/q/q.js:624:44
at runSingle (/Users/richardeng/PharoJSmobile/platforms/android/cordova/node_modules/q/q.js:137:13)
at flush (/Users/richardeng/PharoJSmobile/platforms/android/cordova/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:112:11)
(node:1972) 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:1972) [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.
BTW,“cordova run ios”完美运行。为什么呢?