If you are getting errors even after downloading the newest SDK and Android Studio, here is what I did:
- Download the most recent SDK
- Open file-Project structure (Ctrl + Alt + Shift + S)
- In modules, select app
- In the properties tab: Change compile SDK version to API 23 Android 6.0 marshmallow (latest)
I hope it helps someone so that he won't suffer like I did for these couple of days.