-   Linux - Newbie (
-   -   Ubuntu 10.10 and command line scripts? (

GunNam 03-26-2011 05:17 PM

Ubuntu 10.10 and command line scripts?
I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system.

I am interested in Android programming so I followed the instructions on to install the environment on my computer...

I just installed the JDK, SDK, Eclipse successfully (or I assume):
* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).
** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work, but this is really bugging me.

Can someone point me in the right direction as how I can run scripts like this from the command line?

My system:
Intel i7
Ubuntu 10.10 Maverick Meerkat
eclipse 3.6.2

repo 03-26-2011 05:19 PM

If you are in the directory containing the file you need to use

or give the whole path to the file

Kind regards

GunNam 03-26-2011 06:13 PM

Thanks repo!

I'm at work now, but when I get home, I'm going to have to try that. I can see the "Hello, World" already...

GunNam 03-27-2011 01:36 AM

Okay, so it's still not working... here is what I've tried:

me:~/Droid/android-sdk-linux_x86/tools$ ./android
bash: ./android: Permission denied

me:~/Droid/android-sdk-linux_x86/tools$ sudo ./android
[sudo] password for me:
sudo: ./android: command not found

me:~/Droid/android-sdk-linux_x86/tools$ gksu ./android
(On the 3rd attempt, it looks like something is running, but the window for android never pops up...

Please help.

TobiSGD 03-27-2011 01:44 AM

Change to the directory (in Terminal) where the android file is located, then type chmod +x android. After that, try it again.

GunNam 03-27-2011 01:47 AM

-rw------- 1 me me 3443 2011-02-16 20:48 android

me:~/Droid/android-sdk-linux_x86/tools$ chmod +x android
-rwx--x--x 1 me me 3443 2011-02-16 20:48 android


All times are GMT -5. The time now is 11:48 AM.