【问题标题】:Build Fail in cordova project在科尔多瓦项目中构建失败
【发布时间】:2014-12-17 08:17:57
【问题描述】:

当我尝试构建cordova android项目时出现以下错误,我的平台是ubuntu 14.04

命令:cordova build

构建失败 /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/tools/ant/build.xml:601:执行此行时出现以下错误: /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/tools/ant/build.xml:653:执行此行时出现以下错误: /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/tools/ant/build.xml:698:执行失败:java.io.IOException:无法运行程序“/home/gayan/Softwares/adt -bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/aapt”(在目录“/home/gayan/hello/platforms/android/CordovaLib”中):错误=13,权限被拒绝

/home/gayan/Softwares/adt-bundle-linux-x86_64-20140321是android sdk的位置

/home/gayan/hello/ 是cordova项目路径

谁能帮帮我

【问题讨论】:

  • 检查错误消息中指示的文件夹的权限 (/home/gayan/hello/platforms/android/CordovaLib)

标签: cordova ubuntu-14.04


【解决方案1】:

这是因为您缺少一些库!下面的链接将帮助您下载正确的链接。

This answer fixed it for me.

This related question might help

您总是可以先尝试将其构建为一个 Bowser 应用程序,以检查至少有什么东西可以工作。然后移动到 android 部分。祝你好运!

【讨论】:

    【解决方案2】:

    问题是应用程序“aapt”没有执行权限。这可以通过打开终端来查看:

    cd /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/
    ls -l
    

    输出应该有类似如下的一行:

    -rw-------. 1 <username> <group>  1119502 Sep 13  2013 aapt
    

    (您的实际所有者和组名将出现,而不是我上面使用的 and 占位符)

    假设您具有修改文件权限所需的权限,您可以运行以下命令来为文件添加必要的执行权限(请注意,尽管这将授予每个人对该文件的执行权限):

    chmod +x aapt
    

    这应该允许构建继续。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-06
      • 1970-01-01
      • 1970-01-01
      • 2016-08-02
      • 1970-01-01
      相关资源
      最近更新 更多