Android Studio is a fork of IntelliJ IDEA, which is open sourced and free software (under Apache 2.0), with additions from Google (proprietary and closed source, as far as I can tell), so it has components that are both. This is compatible with the Apache license, which doesn't require that derivative works be distributed under the same license.
So, ultimately, Android Studio has some components that are open source and some that aren't.