Check if you also installed the “Google Repository”. If not, you also have to install the “Google Repository” in your SDK Manager.
Also be aware that there might be 2 SDK installations – one coming from AndroidStudio and one you might have installed. Better consolidate this to one installation – this is a common pitfall – that you have it installed in one installation but it fails when you build with the other installation.