Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android-studio : Error while executing studio.sh

After attending Google IO 2016 extended, I downloaded studio from https://dl.google.com/dl/android/studio/ide-zips/2.2.0.0/android-studio-ide-145.2878421-linux.zip

I extracted it. But after that, I am not able to execute studio.sh..

It shows following error:

To-be-filled-by-O-E-M:~/Applications/android-studio/bin$ ./studio.sh 
./studio.sh: 137: ./studio.sh: declare: not found
./studio.sh: 141: ./studio.sh: Syntax error: "(" unexpected (expecting "fi")

Am I missing something ?

Note: I have posted the issue on Google Plus Community Android Studio. Hers's the Link to my post

like image 444
Chintan Soni Avatar asked May 19 '16 06:05

Chintan Soni


2 Answers

If you are ubuntu user then you can edit studio.sh and change fist line from

#!/bin/sh

to

#!/bin/bash

It works for me in Ubuntu 14.04.

Original Issue

like image 178
Kaushlendra Avatar answered Dec 01 '22 00:12

Kaushlendra


Just use the previous studio.sh file and it works like a charm!

like image 45
Adrian Olar Avatar answered Dec 01 '22 01:12

Adrian Olar