我试图使用Ionic本地文件加密插件,它与Cordova安全插件一起工作。
但是,在我添加插件并尝试使用ionic cordova run android运行它(即使没有在我的代码中使用它)之后,我得到了以下错误:
BUILD FAILED in 5s
at ChildProcess.whenDone (C:\Users\User\Ionic\App\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:70968) 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)有什么问题吗?
发布于 2018-07-20 08:26:58
我也尝试过安装CordovaSafe插件,但是我得到了与您相同的错误。
经过一段时间的尝试,我发现如果你把你的科多瓦降级到以前的版本,这个问题就可以解决。
尝试运行
npm卸载cordova
然后
安装-g cordova@7.1.0
告诉我,如果它工作后,降低您的科多瓦版本,并创建您的项目与CordovaSafe插件再一次。
https://stackoverflow.com/questions/51261178
复制相似问题