gpt4 book ai didi

cordova - ionic 框架错误: Failed to install 'com.ionic.keyboard'

转载 作者:行者123 更新时间:2023-12-02 10:03:11 25 4
gpt4 key购买 nike

刚刚开始尝试 ionic 框架,当我想添加 android 平台时,我遇到了一些麻烦。当我运行命令时:

ionic platform add android

我得到以下内容

Done adding default Ionic resources
Adding icons for platform: android
running cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.ionicframework.tester166478
Name: tester
Activity: MainActivity
Android target: android-22
Copying template files...
Android project created with cordova-android@4.0.0
Running command: "/media/denny/New Volume/projects/mobile/tester/hooks/after_prepare/010_add_platform_class.js" "/media/denny/New Volume/projects/mobile/tester"
Installing "com.ionic.keyboard" for android
Failed to install 'com.ionic.keyboard':Error: /media/denny/New Volume/projects/mobile/tester/platforms/android/cordova/version: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:818:12)
Error: /media/denny/New Volume/projects/mobile/tester/platforms/android/cordova/version: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:818:12)

什么可能导致上述错误?

最佳答案

根据错误信息,由于缺少权限,平台添加失败

Command failed with exit code EACCES

尝试创建文件夹/media/denny/New Volume/projects/mobile/tester/platforms/android/cordova/version时。

如果您运行的是 Mac,您应该会看到 this用户holmescn回答。

如果您运行的是 Linux,请尝试运行

chmod -r 777 *

在您的项目根目录上获得足够的权限。

关于cordova - ionic 框架错误: Failed to install 'com.ionic.keyboard' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29845010/

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