cordova在mac系统下不能编译和预览

发布于 2022-09-07 08:26:42 字数 1634 浏览 16 评论 0

/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.

这是报错信息,大神看下应该是环境的锅吗

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

坠似风落 2022-09-14 08:26:42

jdk 版本太高了

黑寡妇 2022-09-14 08:26:42

看起来应该是jdk版本太高,卸载jdk9,安装jdk8

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文