0

Under Ubuntu (hey it's not Windows but at least it's open source).

After recent upgrade of SDK I tried to start adb but encountered the following Error reported by adb window in IntelliJ...

Unable to detect adb version, adb output: /home/philip/Android/Sdk/platform-tools/adb: 1: /home/philip/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected

future.setException(new RuntimeException( "Unable to detect adb version, adb output: " + sb.toString()));

  • Therefore one can remove the literal from the reported error and one gets the output of sb.toString(), nest'pas? which is...

/home/philip/Android/Sdk/platform-tools/adb: 1: /home/philip/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected

  • And sb.toString() should be the result of the following call..

aProcessBuilder(adb.getPath(), "version");

  • Or in other words "adb getPath version", where to from here?

  • I can do an ls of the path which reported...

    /home/philip/Android/Sdk/platform-tools/adb

  • No worries about the path, it is correct, also the version was reported as 1

  • To run AndroidDebugBridge or adb with the command getPath(), "version"

sudo /home/philip/Android/Sdk/platform-tools/adb -getPath -version

/home/philip/Android/Sdk/platform-tools/adb: 1: /home/philip/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected

  • Exactly the same output as reported as an error, so it is either the way path is set up or it is? a joining of a result with an error by adb. This would occur when the Exception was appended to before being caught and printed to output!

  • Back to the code looking for the error message "Syntax error: " plus error message

NOTHING!

  • Has to be the... CAT - it can't be the path because the version has already been reported, try adb -version

adb: 1: /home/philip/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected

  • This output excludes the path and gives the version PLUS the error message but where does the error message come from?

/home/philip/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected

What IF one runs adb -getpath by itself?

/home/philip/Android/Sdk/platform-tools/adb: 1: /home/philip/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected

Moo!

Help would be appreciated thanks.

2 Answers2

0

This problem occurs with 32-bit system. Foremost version for 32-bit systems is 23.0.1. Try to download previous version of platform tools. http://theandroidbeta.blogspot.com/2015/11/direct-download-android-sdk-platform-tools-rev-23.0.1-and-23.1-beta-offlne-install-november-2015.html

0

Thank you so much. I'm only on the 32 bit version because I thought I had failed to install the 32 bit whatchamacallits for the AVD's which one needs even though 32 bit is @Obsolete BUT what I actually had was a corrupt file and probably had done it right the first time. Anyway, since then my graphics card isn't supported by the latest Ubuntu and so I thought I'd just stay nice and safe with the fall-back 32 Bit install which worked. And now still does. Once again thanks.