在构建/运行android应用程序之前运行python脚本

时间:2015-03-25 21:06:21

标签: android python

在Eclipse中运行“Run As - > Android Application”之前,我想要运行一个python脚本。目前,它向我显示了这些错误。

Errors running builder 'Integrated External Tool Builder' on project 'exampleProject'.
Exception occurred executing command line.
Cannot run program "/Users/mdur/Documents/workspace/exampleProject/res/Swap.py": error=13, Permission denied
Exception occurred executing command line.
Cannot run program "/Users/mdur/Documents/workspace/exampleProject/res/Swap.py": error=13, Permission denied

2 个答案:

答案 0 :(得分:0)

您使用的是哪种操作系统?在Linux上,Permission denied通常意味着您应该使用sudo - sudo do this command而非do this command运行命令。

答案 1 :(得分:0)

Swap.py可执行吗?如果没有,请尝试使用终端设置+ x权限:

sudo chmod +x /Users/mdur/Documents/workspace/exampleProject/res/Swap.py