eclipse 获取 adb 版本失败;错误 = 13 在 Ubuntu 11.10

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8343729/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:23:34  来源:igfitidea点击:

Failed to get adb version; error = 13 in Ubuntu 11.10

androideclipseubuntu

提问by includeMe

I added 32-bit android adk to eclipse(Classic, Indigo, Version: 3.7.0 Build id: I20110613-1736) in Ubuntu 11.10. I use 32-bit Ubuntu. When I start Eclipse the following error occurs.

我在 Ubuntu 11.10 中将 32 位 android adk 添加到 eclipse(Classic, Indigo, Version: 3.7.0 Build id: I20110613-1736)。我使用 32 位 Ubuntu。当我启动 Eclipse 时出现以下错误。

Failed to get the adb version: Cannot run program "android-sdk-linux_x86/platform-tools/adb":java.io.IOException:error=13, Permission denied

获取 adb 版本失败:无法运行程序“android-sdk-linux_x86/platform-tools/adb”:java.io.IOException:error=13,权限被拒绝

I had already tried

我已经试过了

1)set chmod -R 777 for android-sdk-linux_x86, platform-tools and adb. 

2)added jdk 6 as follows
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin
sudo apt-get install sun-java6-bin 
sudo apt-get install sun-java6-jdk

But these two fixes doesn't work. What will be the issue? and can anyone guide me, to fix this issue?

但是这两个修复不起作用。会出现什么问题?谁能指导我解决这个问题?

回答by catoxo

I have the same problem. But my jdk version is 7 . I solved it by doing the following steps:

我也有同样的问题。但是我的 jdk 版本是 7 。我通过执行以下步骤解决了它:

  1. ctrl+alt+t>>vi ~/.bashrc>>Add the path "android-sdk/platform-tools" to export Path= ....:Path
  2. set chmod -R 777 android-sdk`
  1. ctrl+alt+t>>vi ~/.bashrc>>添加路径“android-sdk/platform-tools”导出Path= ....:Path
  2. 设置 chmod -R 777 android-sdk`

回答by includeMe

Finally the issue is fixed. The solution I tried is much similar to @cataxo's answer. In addition to adding the platform-tools I had to add the tools folder in the bashrc.

终于问题解决了。我尝试的解决方案与@cataxo 的答案非常相似。除了添加平台工具之外,我还必须在 bashrc 中添加工具文件夹。

This is how I added the android paths in the bashrc file.

这就是我在 bashrc 文件中添加 android 路径的方式。

# Android tools
export PATH=${PATH}:~/android-sdk-linux_x86/tools
export PATH=${PATH}:~/android-sdk-linux_x86/platform-tools

export ANDROID_SDK_HOME=~/android-sdk-linux_x86/tools
export PATH=$PATH:$ANDROID_SDK_HOME

For those who have this problem after adding this, if you still have this issue then please make sure that the java path is added. It may be like

添加后遇到这个问题的,如果还有这个问题,请确保添加了java路径。它可能像

export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26
export PATH=$PATH:$JAVA_HOME

The java version name may varry depending on the version installed on your machine. To find the version name type java -version from terminal.

java 版本名称可能会因机器上安装的版本而异。要从终端中查找版本名称,请键入 java -version。

If still the issue exists then please check the permissions of avd folder, its contents and .android folder.

如果问题仍然存在,请检查 avd 文件夹、其内容和 .android 文件夹的权限。