Android Studio Adb Syntax Error: ")" Unexpected

android studio adb Syntax error: ) unexpected

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

/system/bin/sh: syntax error: '(' unexpected when specifying a file in ADB

Hey I figured it out!!!

knowing the file:// protocol is for hyperlink structures, I remembered that your usual urls would replace the space symbol with the string %20, so I pushed this song to my other phone, and replaced the spaces with %20, and off it went! now I just have to replace ALL special symbols such as ()[]{}-+!@#$%^&* with their hyperlink equivalents, and that should resolve all my issues!

[jaz@Jaz-Jackson]$ adb shell am start -a android.intent.action.VIEW -d "file:///storage/self/primary/Music/Ra%20Ra%20RasPutin.mp3" -t audio/mp3
Starting: Intent { act=android.intent.action.VIEW dat=file:///storage/self/primary/Music/Ra Ra RasPutin.mp3 typ=audio/mp3 }

yes. the only song i could find in my music that didn't have any special symbols was Ra Ra RasPutin. it works though!

Unable to create Debug Bridge Unable to detect adb version. Syntax error: ) Upgrading Platform-tools 23.0.1 to 23.1.0 Linux-32 bit causes Issue

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

Android ADB can not start on ubuntu 14.04 LTS or Cannot launch AVD in emulator

This happens with the Android Studio new update if your system is 32-bit.
You can downgrade this update, Follow these steps:

1.Download this arch. : https://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
2.Go to your Android SDK folder

3.Remove old /platform-tools

4.Insert downloaded from link above

Hope this help you.

What does an unexpected token mean and can I solve it?

You have invisible character in these lines, \8232 is line separator. Possibly you copied it somewhere.

Try to paste it in Notepad/TextEdit and copy text from there. Point is to get rid of formatting and extra characters. Or you can just delete these lines and retype them manually.

Android Studio (3.1.2) problems with ADB-service

Adb after installation seems to run correct.

Your device is listed as unauthorized so I guess you did not turn on developer tools on your device, or on your device you did not accept debuging with connected computer.

To turn on developer options on device:

  1. Open Settings on your Android O running device.
  2. Select System » About phone.
  3. Scroll down and tap seven times on the Build number entry.
  4. Now go back to Settings » System » and select Developer options from there.

In these options you should allow usb debuging if it’s not on by default.

After connecting usb cable to your device and conputer you should see prompt on your device asking for permissions to allow debuging. If you accept that you should be able to run adb tools, logcat etc on your connected device.


EDIT

Looking at the error you described in comments, it looks like it is error specific for 32-bit version systems. So I see there two possible solutions:

  1. reinstall your system for 64-bit version

or more likely:


  1. downgrade your adb platform tools

How to downgrade adb platform tools:

  • Download platform tools from this archive:
    https://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
  • Go to your Android SDK folder (so in your case it will bee /home/fredrik/Android/sdk/)
  • Remove old platform-tools
  • Insert data from link downloaded above

Hope it will be your case. Please keep in mind that updates of Android Studio will probably restore that error again.

Debugging react-native on android - com.facebook.react.devsupport.JSException: Unexpected token '*'

So after much debugging I found the cause of this issue and I'll post it here incase anyone else runs into it.

My project is using the

Exponentiation operator **

(I think this was introduced in ES6).

As I said in my question, this doesn't cause any issues when running on iOS. I haven't dug deep enough yet, but it appears that there must be a bug in the react-native code base on the Android side of things. Maybe it is in Bable? I'm not 100% sure.

What I do know however, is

changing from, for example, 2 ** 3 to Math.pow(2,3) solves this for
me.

Update on this answer:

I am not able to reproduce this creating a brand new RN project. The project in which I had this problem was upgraded from RN 42, so there must be an issue with the upgrade process.



Related Topics



Leave a reply



Submit