简体   繁体   English

Cordova 6.4.0:Android平台安装白名单错误

[英]Cordova 6.4.0: android platform install Whitelist error

I'm setting up a first cordova projecct. 我正在设置第一个cordova项目。

After installing globally Cordova and creting a first app repository am trying to set up the android platform within this command: 在全局安装Cordova并创建第一个应用程序存储库后,尝试在此命令中设置android平台:

cordova platform add android --save 科尔多瓦平台添加android --save

But this action ends up by generation this error message: 但是此操作最终会生成以下错误消息:

BUILD FAILED 建立失败

Total time: 0.989 secs Failed to install 'cordova-plugin-whitelist':Error: /home/firas/Bureau/Cordova/HelloWorld/HelloWorld/platforms/android/gradlew: Command failed with exit code 1 at ChildProcess.whenDone (/home/firas/Bureau/Cordova/HelloWorld/HelloWorld/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at maybeClose (internal/child_process.js:821:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) Error: /home/firas/Bureau/Cordova/HelloWorld/HelloWorld/platforms/android/gradlew: Command failed with exit code 1 总时间:0.989秒未能安装“ cordova-plugin-whitelist”:错误:/ home / firas / Bureau / Cordova / HelloWorld / HelloWorld / platforms / android / gradlew:命令失败,退出代码为ChildProcess.whenDone(/ home /firas/Bureau/Cordova/HelloWorld/HelloWorld/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)在ChildProcess.emit(events)上的generateTwo(events.js:87:13) .js:172:7)位于Process.ChildProcess._handle.onexit(internal / child_process.js:211:5)可能接近(内部/child_process.js:821:16)错误:/ home / firas / Bureau / Cordova / HelloWorld / HelloWorld / platforms / android / gradlew:命令失败,退出代码为1

I have tried to remove and re-add the adroid platform , but the problem persists , also I have tried to install the whitelist plugin (cordova plugin add cordova-plugin-whitelist@1.0.0 ) 我试图删除并重新添加adroid平台,但是问题仍然存在,我也试图安装白名单插件(cordova插件添加cordova-plugin-whitelist@1.0.0)

but also I faced the same problem , and finish by not being able to build or run my first HelloWord app 但是我也遇到了同样的问题,并且由于无法构建或运行我的第一个HelloWord应用程序而结束

This issue appears especially with Cordova 6.4.0 (latest until 31 December 2016) . 此问题在Cordova 6.4.0(最新至2016年12月31日)中尤其明显。

To solve this problem, simply uninstall Cordova and re-install it for the version 6.0.0 which affords more stability with the whitelist component. 要解决此问题,只需卸载Cordova并将其重新安装到6.0.0版本即可,该版本为白名单组件提供了更高的稳定性。

Steps: 脚步:

  1. npm uninstall -g cordova
  2. npm install -g cordova@6.0.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Cordova平台在Windows 8上添加android错误 - cordova platform add android error on Windows 8 无法安装&#39;cordova-plugin-whitelist&#39;:错误:cmd:命令失败,退出代码为1 - Failed to install 'cordova-plugin-whitelist':Error: cmd: Command failed with exit code 1 Cordova平台iOS错误 - Cordova platform ios error Meteor.js Cordova错误:ERROR白名单拒绝 - Meteor.js Cordova Error: ERROR whitelist rejection Cordova:尝试添加Android平台时出现EACCES错误。 更改PATH不能解决问题 - Cordova: EACCES error when trying to add Android platform. Changing PATH doesn't fix it 科尔多瓦白名单插件不起作用 - Cordova whitelist plugin does not work 离子Cordova平台添加android错误:源路径不存在:resources / android / icon / drawable-hdpi-icon.png - ionic cordova platform add android Error: Source path does not exist: resources/android/icon/drawable-hdpi-icon.png 为什么AngularJS ui-route在Cordova的Android平台上不起作用? - Why AngularJS ui-route is not working on android platform for cordova? 如何解决Cordova错误:无法获取平台&lt;&lt;&lt;&lt;&lt; HEAD? - How do I fix the Cordova error: Failed to fetch platform <<<<< HEAD? Cordova 白名单没有做它应该做的事情? - Cordova whitelist not doing what its supposed to do?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM