Search code examples
androideclipseandroid-sdk-1.6

An SDK Target must be specified error with android SDK


I have just put the first step in android,and just started with hello android example of android http://developer.android.com/guide/tutorials/hello-world.html. Now the problem is that when i navigate to /tools directory and execute the command android create avd --target 2 --name my_avd ,it gives error like :

mac123:android-sdk-mac_86 mac1$ android create avd --target 2 --name my_av -bash: android: command not found

Please mark that i am working with mac OS. Also is it any other way possible for the installation of the android SDK.

Kindly help me out.

Thank you.


Solution

  • I'm not sure know about mac os, but usually in unix-like systems the current directory is not in the PATH environment variable (a variable that tells your shell where to find executables). So to execute a command in your current directory you have to prepend ./:

    $ cd [android_sdk_dir]/tools
    $ ./android create adv [...]
    

    anyway consider beginning with eclipse, it eases a lot of tasks.