无法运行程序和QUOT;亚洲开发银行和QUOT ;:错误= 2,同时通过月食执行没有这样的文件或目录 [英] Cannot run program "adb": error=2, No such file or directory while executing through eclipse

查看:199
本文介绍了无法运行程序和QUOT;亚洲开发银行和QUOT ;:错误= 2,同时通过月食执行没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用appium在Mac机(约塞米蒂OS)。Android设备自动化

I am trying to automate android devices using appium in Mac machine(Yosemite OS).

我下载并设置所有必需的路径类似的SDK,构建工具,工具,paltform工具,平台和能够通过终端成功地运行了亚行的命令。

I downloaded and set all the required PATHS like sdk,build-tools,tools,paltform-tools,platforms and able to run the adb commands through terminal sucessfully.

不过,我在下面的java code写的样本

But I written sample below java code

**Process p = Runtime.getRuntime().exec("adb devices");** 

获取输出:

不能运行程序亚行:错误= 2,没有这样的文件或目录**

Cannot run program "adb": error=2, No such file or directory**

我无法找出确切的问题,为什么它正在通过终端和为什么我通过月食得到错误,即使我的一切设置路径。

I am unable to figure out the exact problem, why it is working through terminal and why i am getting error through eclipse even I set path for everything.

你能取悦任何一个建议我究竟是什么issue.Please做要紧。

Could you please any one suggest me what exactly the issue.Please do the needful.

推荐答案

我面对的IntelliJ社区版+ Mac的组合这个问题。但原因似乎是相同的,尝试调用使用命令提示符(通过终端)的IDE(Eclipse的),因此它可以使用该系统的路径,进而认识到亚行,你提到从终端亚行的作品所以一旦IDE发布从终端再次路径将不胜荣幸。

I faced this issue with IntelliJ community edition+ Mac combo. But the reason seems the same, try to invoke your IDE (Eclipse) using the command prompt (Via Terminal) so that it can use the system paths, and in turn recognize adb, you mentioned that adb works from terminal so once the IDE launches from terminal again the paths would be honored.

这篇关于无法运行程序和QUOT;亚洲开发银行和QUOT ;:错误= 2,同时通过月食执行没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆