Missing platform-tools when installing Android Studio on Mac OSx

22,482

Solution 1

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

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.

Solution 2

I had the exact same problem on Mac OS X. Here is how I fixed it. Open terminal and use the following commands.

$cd ~/Library/Android/sdk/tools/

$./android update sdk --no-ui --filter 1

It will start the update of package in non-gui mode and ask for permission etc. and finally install well.

** I replied this on another thread as well. But I think this will help everybody because these are all related. I struggled much to find this solution. Depending on search keywords, people will end up in either of these threads.

Solution 3

Had similar issue (Android studio 3.0). Happened because I was behind a corporate proxy and the tools were not downloaded during setup.

Solution:

  1. Configure proxy in settings -> HTTP proxy
  2. Re-install Android Studio. proxy configuration will persist and the installation should succeed the second time (got additional window with the tools to download)

Solution 4

The android command that many of the above answers use is now deprecated, and may or may not work for recent installations.

I just solved a similar problem to the above (for me the platform-tools package installed, but the installation was missing several files) by running the commands:

cd ~/Library/Android/sdk
tools/bin/sdkmanager --uninstall platform-tools
tools/bin/sdkmanager --install platform-tools

The uninstall step may not be necessary for everyone.

Share:
22,482
tempomax
Author by

tempomax

Updated on March 16, 2020

Comments

  • tempomax
    tempomax about 4 years

    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.
    

    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:

    The following SDK component was not installed: platform-tools

    The output shows:

    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'
    

    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:

    Please specify a Android SDK Location

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

    Note: If you have not yet downloaded the SDK tools, download them now. For a complete IDE and Android SDK package, we recommend downloading Android Studio.

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

  • tempomax
    tempomax about 8 years
    the folders under /Users/your-user/Library can only be accessed by root user or wheel group. Every time I setup Android Studio, the android sdk folder doesn't exist. I changed it to my local home directory, and it has installed the sdk there. However, I still get the platform-tools missing problem, and the IDE still can't find the android sdk.
  • thuongle
    thuongle about 8 years
    you can try chown -R <your_normal_user_name>:wheel your_SDK
  • tempomax
    tempomax about 8 years
    I already installed it to my local home where I have the necessary permissions, yet it doesn't recognize the sdk and is complaining about platform-tools not being found.
  • thuongle
    thuongle about 8 years
    Can you run Android SDK Manager on your machine?
  • tempomax
    tempomax about 8 years
    Can you link an official download page rather than a dropbox link?
  • tempomax
    tempomax about 8 years
    I downloaded the official Standalone SDK Tools, but I do not see [Android/sdk]/platform-tools when I unpacked the zip.
  • tempomax
    tempomax about 8 years
    No, I can't. Nothing happens when I click Launch Standalone SDK Manager, and I also can't switch tabs to SDK Tools
  • duncanc4
    duncanc4 about 8 years
    This solution worked for me. I relaunched Android Studio after the SDK update finished and Android Studio continuned with installing the rest of the components.
  • milosmns
    milosmns about 4 years
    There's literally nothing preventing a malicious uploader to host a bitcoin miner like this, for example. Not saying you are one, just agreeing with @tempomax.