For OSX android studio i’ve accomplished with this steps:
Open IntelliJ/Android Studio -> Tools -> Create Command Line Launcher
After that, open SourceTree Preferences: and put “/usr/local/bin/studio” in Diff/Merge Command.
Like this:
Diff Arguments:
diff $LOCAL $PWD/$REMOTE
Merge Arguments:
merge $PWD/$LOCAL $PWD/$REMOTE $PWD/$BASE $PWD/$MERGED
And if everything it’s ok it should work.