views:

365

answers:

3

I'm still pretty new to Android and programming in general, and I can't seem to get the command line tools packaged with the Android SDK to work. I'm running Mac OSX and each time I try to run layoutopt, for example, the terminal returns, *-bash: cmd: command not found *

Also, is it okay to have my SDK located in the Developer directory and my android project in some unrelated directory when using these tools?

A: 

Here is a good description:

To connect to the console of any running emulator instance at any time, use this command:

telnet localhost <console-port>
Roflcoptr
Thanks!, but will that help me run the layoutopt tool? I connected to the emulator, but it let me access network related commands.
fordays
I dont understand your comment... sry.
Roflcoptr
A: 

I figured it out. I needed to go to the /tools directory in the SDK folder and type in:

./layoutopt <directorypath>
fordays
+1  A: 

If you want you can put the path in your ~/.bash_profile so you can call it from anywhere:

export ANDROID_HOME=/Users/<username>/path/to/sdk/tools

export PATH=$PATH:$ANDROID_HOME/tools
NKijak