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

查看:55
本文介绍了在 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 gig 的内存,然后它继续下载组件并安装.但是,在某些时候会出现一个弹出窗口:

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.但是在 Preferences -> Appearance &行为 -> 系统设置 -> 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天全站免登陆