I had this issue for weeks and got carried down the wrong path to solve it. It turned out I had installed it through homebrew but also through the official install through android, and there were some conflicting locations for the android sdk.
I'd recommend trying:
- remove android studio and android-sdk COMPLETELY.
https://stackoverflow.com/questions/17625622/how-to-completely-uninstall-android-studio
In addition to above stack overflow, try `brew uninstall android-sdk` in case you use homebrew at some point. Delete every trace of it from anywhere the sdk might be.
Download android studio 3.0 for mac (new version works fine for me, but should be able to use an older one too). Follow all setup steps for creating a new test app, and
let android studio download all the necessary sdk components in recommended location. If you follow the prompts to install stuff, everything should work perfectly.
you need to setup a new project with android studio to download the necessary components (select create new project from load screen). Then, when running the app, you will see some errors that say you need to download additional components, and after installing all of these, it will work.
Also, one other small issue is that my ANDROID_HOME env variable was messed up. Default for mac should be /Users/{user}/Library/Android/sdk