android studio newbie error

i get this error everytime i opened android studio

Error:Failed to find target with hash string ‘android-26’ in: C:\Users\Fila\AppData\Local\Android\Sdk Consult IDE log for more details (Help | Show Log) Install missing platform(s) and sync project

Based on what I remember doing when I got this error once, you need to go to

Files>Settings>Appearances and Behaviours>System Settings>Android SDK

From here two things can happen:

  1. If the options for different packages are greyed out, that is you are not able to select any, then you probably need to change the SDK Location up on the top. Your current location of the SDK is probably wrong

Mine is C:\Users\User_name\AppData\Local\Android\Sdk ,

so replace User_name with the name of your user and check if that sorts out anything

OR click on edit and see what you get and if that takes you anywhere.

  1. The different platforms are clickable. You simply need to install one of them and select it and click on OK