Setup Android SDK in Unity with Android Studio

Written on September 04, 2014

To build Unity projects for Android the Android SDK (Software Development Kit) needs to be installed. If you’re using Android Studio the SDK will be already part of that installation.

So far so good, but when Unity asks you to select the Android SDK root folder you’ll have a problem because it is part of the Android Studio package and therefore isn’t accessible to Unity.

To work around this let’s create a symbolic link to the SDK’s root folder in our Applications root. Open a Terminal window and execute the following command:

sudo ln -s /Applications/Android\ Studio.app/sdk /Applications/Android\ SDK

The command ln used with the option -s will create a symbolic link to the SDK location /Applications/Android\ Studio.app/sdk as /Applications/Android\ SDK.

Note that a backslash \ before a space (e.g. \ SDK) is escaping that space to prevent it from being treated as a separator, hence part of that directory.

Voilà. Now we can select the Android SDK root folder when Unity asks us:

Martin Buberl

Purveyor of Internet duct tape.
If you'd like to get in touch, feel free to shout @martinbuberl.