android studio adb Syntax error: ")" unexpected
this morning when I start doing my daily routine(opening android studio 1.5.1 in my PC - lubuntu 32 bit) I encounter an error after I try to run my application to my device. This is the android studio error:
Error running app: Unable to obtain debug bridge
Unable to detect adb version, adb output: /root/Android/Sdk/platform-tools/adb: 1: /root/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected
I was looking for possible solution for hours now through internet but can't find same error as this. I already try some other remedies but still no luck of solving it. Can you help me guy? Thanks in advance.
Solution 1:
for 32bit users... Don't update "platform-tools" to version 23.1.
foremost version you can use is 23.0.1 which you can download here
If you are on 64bit machine and having trouble using the latest version of the plateform-tools.. check instructions here.
thanks for the working link- @Tyler
Solution 2:
OK. after some research found that reason for this is because
android-sdk-linux/platform-tools content is 32-bit ELF in 23.0.1 but 64-bit ELF in 23.1_rc1 and 23.1.0. So, several functions in android-studio (and I assume eclipse+ADT as well) fail because of the attempt to run 64-bit executables.
This issue has already been raised HERE
Also, as per the official comment given by google project member parts of the platform-tools will support 64 bit Ubuntu OS only from 23.1.0 onwards.
Platform-tools 23.1.0 OR onwards will not work on Ubuntu 32-bit OS. Developer needs to upgrade Ubuntu OS to 64-bit to make it work.
That eventually means we only have possible two workarounds now :
1. Stick with Platform-tool 23.0.1 as of now. and DO NOT UPGRADE platform-tools to 23.1.0 or above
2. Change your Ubuntu OS to 64-bit instead of 32-bit.
I hope this would help someone.
download sdk platform-tool 23.0.1 from this link
Solution 3:
As Arnav M. said, for Ubuntu 32bit users, stick to 23.0.1 or install a 64bit Ubuntu. For more details see this:
https://stackoverflow.com/a/34239600/3032209