在Mac OSx上安装Android Studio时缺少平台工具 [英] Missing platform-tools when installing Android Studio on Mac OSx

查看:1070
本文介绍了在Mac OSx上安装Android Studio时缺少平台工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Mac OSx上安装Android Studio,目的是学习一些Android开发。提供的说明只是:

I am trying to install Android Studio on Mac OSx, with the goal of learning some Android development. The instructions provided were simply to:

1. Launch the .dmg file you downloaded.
2. Drag and drop Android Studio into the Applications folder.
3. Open Android Studio and follow the setup wizard to install any necessary SDK tools.

我进入设置向导,选择所有内容,当被问到时给它6演出ram然后它继续下载组件并安装。但是,在某些时候会出现一个弹出窗口:

I get to the setup wizard, select everything, give it 6 gigs of ram when asked, then it proceeds to download components and install. However, at some point a popup appears:

未安装以下SDK组件:platform-tools

输出显示:

Ignoring unknown package filter 'platform-tools'
Installing Archives:
  Preparing to install archives
  Installing Google APIs, Android API 23, revision 1
    Installed Google APIs, Android API 23, revision 1
  Installing Google APIs Intel x86 Atom System Image, Google Inc. API 23, revision 12
    Installed Google APIs Intel x86 Atom System Image, Google Inc. API 23, revision 12
    Updated ADB to support the USB devices declared in the SDK add-ons.
  Stopping ADB server failed (code -1).
  Unable to run 'adb': Cannot run program "/Users/me/Library/Android/sdk/platform-tools/adb": error=2, No such file or directory.
  Starting ADB server failed (code -1).
  Done. 2 packages installed.
Ignoring unknown package filter 'platform-tools'

如果我继续点击完成按钮,它打开了Android Studio。但在 偏好设置 - >外观&行为 - >系统设置 - > Android SDK ,我看到一个错误:

If I proceed to click "Finish" button, it opens up the Android Studio. But under Preferences -> Appearance & Behavior -> System Settings -> Android SDK, I see an error:

请指定Android SDK位置

独立SDK工具,但我认为Android Studio会附带在Android中开发所需的所有软件包:

There is Standalone SDK Tools, but I was under the impression that Android Studio would come with all packages needed to develop in Android:

注意:如果您尚未下载SDK工具,请立即下载。对于完整的IDE和Android SDK软件包,我们建议您下载Android Studio。

所以我对于应该安装的内容感到很遗憾。如何让我的Android Studio在我的Mac上正常工作?

So I'm kinda lost on what things I should be installing. How can I get my Android Studio to 'work' on my Mac?

推荐答案

好的,所以我找到了一个有效的解决方案。这个 Stackoverflow线程使用命令行来更新SDK。我进入了 tools / 并运行:

Okay, so I found a solution that works. This Stackoverflow thread was using command-line to update the SDK. I went into my tools/ and ran:

android update sdk -u

从服务器中提取所有必需的SDK组件。完成后,我就可以将Android Studio指向独立的SDK文件夹,现在看起来很有效。

That pulled all the necessary SDK components from the server. Once it was done, I was able to point Android Studio to the standalone SDK folder and things seemingly work now.

这篇关于在Mac OSx上安装Android Studio时缺少平台工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆