smace smace - 1 month ago 16
Android Question

IntelliJ IDEA 12 and Homebrew Android SDK

I have installed latest android SDK through Homebrew:

brew install android
brew info android
android-sdk: stable r21.1
/usr/local/Cellar/android-sdk/r21.1 (9032 files, 619M) *
Built from source
==> Caveats
Now run the `android' tool to install the actual SDK stuff.

The Android-SDK location for IDEs such as Eclipse, IntelliJ etc is:

You will have to install the platform-tools and docs EVERY time this formula
updates. If you want to try and fix this then see the comment in this formula.

You may need to add the following to your .bashrc:
export ANDROID_SDK_ROOT=/usr/local/opt/android-sdk

Bash completion has been installed to:

I have installed latest SDK from 'android' tool, but when creating a new Project/Android Application in IntelliJ IDEA 12, I can't had path to android SDK (in /usr/local/Cellar/), I can't copy/past the path in the form, IntelliJ is opening Finder and it's impossible to reach /usr/local/Cellar.

I'am looking for a clean and elegant way to add homebrew's android sdk in IntelliJ IDEA

Answer Source
  1. Press CmdShift. in the file chooser dialog to show the hidden files.

  2. Navigate to /usr/local/Cellar/android-sdk/r21.1 directory.

If the keyboard shortcut doesn't work (e.g. another plugin is using that shortcut), another alternative is to add /usr to your finder favorites and navigate from there.