android - ubuntu15 adb 执行错误
怪我咯
怪我咯 2017-04-17 15:17:34
0
2
646

ubuntu15(32位),androidstudio1.5(android-studio-ide-141.2456560-linux.zip ),androidsdk24.4.1(android-sdk_r24.4.1-linux.tgz),JDK(jdk-8u65-linux-i586.tar.gz)

错误信息:
david@david-laptop:/opt/android-studio/bin$ adb
bash: /home/david/android-sdk-linux//platform-tools/adb: cannot execute binary file: 可执行文件格式错误

david@david-laptop:~/android-sdk-linux/platform-tools$ ./adb
bash: ./adb: cannot execute binary file: 可执行文件格式错误

环境变量:

set Java environment

JAVA_HOME=/usr/java/jdk_8u65
export JRE_HOME=/usr/java/jdk_8u65/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

Setup android's sdk environment

if [ -d /home/david/android-sdk-linux/ ]; then
ANDROID_SDK_HOME=/home/david/android-sdk-linux/
PATH=${ANDROID_SDK_HOME}/platform-tools:${ANDROID_SDK_HOME}/tools:$PATH
fi

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
阿神

Can you post a screenshot of the variable configuration? (Method: Enter $PATH in Terminal), and then help you determine whether the environment variables are configured correctly.
Intuitively, your adb does not have execution permissions. You can empower it first, and you can empower the entire sdk.
Execute the command
chmod a+x ~/android-sdk_r24.4.1-linux.tgz
and then unzip

Ty80

@chuyao
Hello, I unzipped to the /opt directory before, and then sudo mv to the home directory. At that time, I was thinking about whether there was a problem with the permissions. rm -rf directory, and re-unzipped to the home directory tar zxvf an.. -C /home/david, the problem remains the same, I confirmed that there is no problem with downloading the version
The result of $PATH is shown in the picture

Updated at 12:36:
david@david-laptop:~$rm -rf android-sdk-linux
david@david-laptop:~$chmod a+x ~/download/android-sdk_r24. 4.1-linux.tgz
david@david-laptop:~$tar zxvf ~/dwonload/an.. -C ~/
...
david@david-laptop:~/android-sdk- linux/platform-tools$ ./adb
bash: ./adb: cannot execute binary file: executable file format error

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!