Launch Android SDK manager - Tools directory doesn't exist? Mac

好久不见. 提交于 2020-01-01 02:53:06

问题


I'm on mac, I think I've done everything right so far. following these instructions: http://developer.android.com/sdk/installing/adding-packages.html

it says to navigate to tools/ directory in terminal. Here are my steps.

  1. Open terminal

  2. cd Applications result is: No such file or directory

path to my tools directory is as follows

Applications->adt-bundle-mac-x86_64-20130219  ->SDK -> tools

I tried putting my folder onto my desktop, both the tools folder, and my adt-bundle because I could change directory to my desktop, and when I enter ls to the terminal I see my tools folder, and my adt-bundle is there,

but the problem is when I try to enter

cd tools

or

cd adt-bundle(etc...)

it says that it is not a directory.

what do I do?


回答1:


I recently encountered this issue, and figured I'd post on this for clarification or for anyone still encountering it.

It seems you have to be at the root of the /adt-bundle-mac-VERSION/sdkdirectory in order to execute the "android" command. I normally cd into the directory until I reach the location of the command, but in this case I encountered the same issue as the original poster.

You must use the tab key to the android command... ie...

locate your installation /adt-bundle-mac-x86_64-20131030/sdk hit TAB key /tools hit TAB key /android

instead of cd adt-bundle-mac-x86_64-20131030/ cd/sdk cd/tools android

If done properly the SDK manager should launch for you.

Hope this helps anybody out there.




回答2:


Here is the directory.

`cd /adt-bundle-mac-x86_64-20131030/sdk/tools` 

hit enter

just type ./android




回答3:


You can launch the SDK Manager by using the GUI:

  • Launch Android Studio
  • Create a new blank project
  • In the toolbar, look for the icon with tooltip "SDK Manager"




回答4:


Use cd /users/user/...your path.../android-sdk/tools

and then :

./android




回答5:


A lot of answers have been given here that you should go to /{path-to-your-android-sdk}/tools and run ./android.

For me, this did not work. When I opened the android file located at my /{path-to-your-android-sdk}/tools directory with a text editor, it contained the following:

#!/bin/bash
echo The "android" command is no longer available.
echo For manual SDK and AVD management, please use Android Studio.
echo For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
exit 1

So the right approach now, is as stated by @Shijil in his comment.

In the directory for your android sdk, you should use:

For SDK Manager:

cd tools
cd bin
./sdkmanager

For AVD Manager:

cd tools
cd bin
./avdmanager

NB For the last command in each of the options above, you will have to supply additional args depending on the operation you want to perform. An example arg that works for both is --list. Running the commands without any args will only display the possible args you could have passed.

Personally, I think using the GUI in android studio is easier. Especially for linux beginners.




回答6:


Here is your "tools" directory for Android Studio in OS X El Captain(Yosemite also has the same path hopefully):

Users/user-name/Library/Android/sdk/tools

In the terminal, just type: Library/Android/sdk/tools and hit enter. And you are in the tools folder.

Please note that user-name refers to the mac user




回答7:


Better open terminal and type which android.

It will tell you the path where you have the package installed.

Then yeah, you just have to execute that path on the terminal.

Your android package might have been installed with Homebrew or others, so the path can be different.

Edit: typo




回答8:


For me the directory was cd /Users/your_user_name/Library/Android/sdk/tools/ and after that the command was ./android list targets I hope this can help



来源:https://stackoverflow.com/questions/16271242/launch-android-sdk-manager-tools-directory-doesnt-exist-mac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!