简体   繁体   English

必须将android SDK的SDK Target指定为错误

[英]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 . 我刚刚将android迈出了第一步,并以android http://developer.android.com/guide/tutorials/hello-world.html的 hello android示例开始。 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 : 现在的问题是,当我导航到/ tools目录并执行命令android create avd --target 2 --name my_avd ,它给出如下错误:

mac123:android-sdk-mac_86 mac1$ android create avd --target 2 --name my_av -bash: android: command not found mac123:android-sdk-mac_86 mac1 $ android create avd --target 2 --name my_av -bash:android:命令未找到

Please mark that i am working with mac OS. 请标记我正在使用Mac OS。 Also is it any other way possible for the installation of the android SDK. 也可以通过其他任何方式安装android SDK。

Kindly help me out. 请帮我。

Thank you. 谢谢。

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). 我不确定是否知道mac os,但通常在类似Unix的系统中,当前目录不在PATH环境变量中(该变量告诉外壳程序在哪里找到可执行文件)。 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. 无论如何,考虑从Eclipse开始,它可以简化许多任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM