gpt4 book ai didi

cordova - 运行cordova构建时未处理的PromiseRejectionWarning

转载 作者:行者123 更新时间:2023-12-01 05:55:40 24 4
gpt4 key购买 nike

第一次使用 Cordova,这个从一开始就难倒了我。在运行cordova create时设置的默认项目上运行“cordova build”时...我收到以下错误:

Android Studio project detected
ANDROID_HOME=/Users/jen/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
studio
(node:1951) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [object Object]
(node:1951) [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.

我在 8.0.0 上运行 macOS High Sierra 10.13.4 和 Cordova。我可能在安装过​​程中遗漏了一些东西,但我找不到它是什么。

谢谢

最佳答案

在 macOS High Sierra 上遇到了同样的问题。

(node:1951) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [object Object]
(node:1951) [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
cd /Library/Java/JavaVirtualMachines
sudo rm -rf jdk1.8.0_101.jdk

从以下位置下载 dmg:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
export JAVA_HOME=/Library/Java/JavaVirtualMachines/<your version>/Contents/Home

如果发生进一步的错误,请尝试:
brew install gradle

希望这能解决问题。

关于cordova - 运行cordova构建时未处理的PromiseRejectionWarning,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49752598/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com