简体   繁体   English

Android SDK Manager无法打开Mac

[英]Android sdk manager won't open Mac

I'm trying to double click the SDK Manager from the Android Studio window, but it won't open. 我试图从Android Studio窗口中双击SDK Manager,但无法打开。 I'm assuming it has something to do with path variables. 我假设它与路径变量有关。 I'm on Mac, and I don't know the commands to fix it. 我在Mac上,但不知道用于修复它的命令。

http://developer.android.com/sdk/installing.html http://developer.android.com/sdk/installing.html

On Linux, edit your ~/.bash_profile or ~/.bashrc file. 在Linux上, 编辑 ~/.bash_profile~/.bashrc文件。 Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. 查找设置PATH环境变量的行,并向其添加tools /目录的完整路径。 If you don't see a line setting the path, you can add one: export PATH=${PATH}:/tools 如果看不到设置路径的行,则可以添加以下内容: export PATH=${PATH}:/tools

On a Mac OS X, look in your home directory for .bash_profile and proceed as for Linux. 在Mac OS X上,在主目录中查找.bash_profile然后按照Linux进行操作。 You can create the .bash_profile if you haven't already set one up on your machine. 如果尚未在计算机上设置.bash_profile则可以创建它。 Should work. 应该管用。

You may have dowloaded Android Studio w/o Android SDK. 您可能没有Android SDK下载了Android Studio。

It should be similar to intelliJ, so try this: Download just a command line tool from here (scroll to the very bottom) android-sdk_r24.4.1-macosx.zip , it is zip file, unpack it. 它应该与intelliJ类似,因此请尝试以下操作:从此处下载一个命令行工具(滚动到最底部) android-sdk_r24.4.1-macosx.zip ,它是一个zip文件,将其解压缩。

With your project open - Open (or File\\New\\File if missing) local.properties file in your project and add this: 在打开项目的情况下-在项目中打开(或缺少File \\ New \\ File)local.properties文件,并添加以下内容:

sdk.dir=/(path to folder where you unpacked)/android-sdk-macosx/ sdk.dir = /(解压缩文件夹的路径)/ android-sdk-macosx /

now Tools\\Android\\SDK Manager should start SDK Manager 现在Tools \\ Android \\ SDK Manager应该启动SDK Manager

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

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