It is my first time to use android studio V 3.1.3
when i finished installation and trying to build this error is shown
it said that "Basic functioality not working correctly such as building and debugging "
i do not known how to solve it
i use a local gradle distribution like this

Then press on sync project with gradles files
but this error is still shown.
It works well but after that this error is happened

any help
Thanks in advance.

I also have the same problems as you,Now I have solved it.
The following are the steps to be solved