LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu 10.10 and command line scripts? (http://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-10-10-and-command-line-scripts-871180/)

GunNam 03-26-2011 04: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 http://developer.android.com/sdk/installing.html 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
android-sdk-linux-x86
eclipse 3.6.2

repo 03-26-2011 04:19 PM

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

./android
or give the whole path to the file

Kind regards

GunNam 03-26-2011 05: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 12:36 AM

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

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

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

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

Please help.

TobiSGD 03-27-2011 12: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 12:47 AM

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


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

SUCCESS!! THANK YOU!


All times are GMT -5. The time now is 06:33 PM.