LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-26-2011, 04:17 PM   #1
GunNam
LQ Newbie
 
Registered: Sep 2006
Location: Los Angeles
Distribution: Ubuntu 10.10
Posts: 17

Rep: Reputation: 0
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
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-26-2011, 04:19 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,496

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
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
 
1 members found this post helpful.
Old 03-26-2011, 05:13 PM   #3
GunNam
LQ Newbie
 
Registered: Sep 2006
Location: Los Angeles
Distribution: Ubuntu 10.10
Posts: 17

Original Poster
Rep: Reputation: 0
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...
 
Old 03-27-2011, 12:36 AM   #4
GunNam
LQ Newbie
 
Registered: Sep 2006
Location: Los Angeles
Distribution: Ubuntu 10.10
Posts: 17

Original Poster
Rep: Reputation: 0
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.
 
Old 03-27-2011, 12:44 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,438
Blog Entries: 2

Rep: Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001
Change to the directory (in Terminal) where the android file is located, then type chmod +x android. After that, try it again.
 
2 members found this post helpful.
Old 03-27-2011, 12:47 AM   #6
GunNam
LQ Newbie
 
Registered: Sep 2006
Location: Los Angeles
Distribution: Ubuntu 10.10
Posts: 17

Original Poster
Rep: Reputation: 0
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!
 
  


Reply

Tags
android, command line, scripts, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
running sh scripts from csh command line casperdaghost Linux - Newbie 6 04-22-2010 05:12 AM
executing CGI scripts from command line mcnscott Programming 7 08-01-2007 08:08 PM
php command line scripts naflan Programming 5 11-09-2004 08:02 AM
Change kde theme & wallpaper from command line or start scripts? JHuizingh Linux - Software 2 12-11-2003 06:44 PM
Command to list line length of multiple scripts Tekime Linux - General 2 09-06-2002 01:04 AM


All times are GMT -5. The time now is 12:20 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration