Gradle sync in Android Studio failed due to unknown reasons

I cloned source from a Windows Android project in bitbucket using source tree and pulled into the AndroidProjectStudio on Mac. The following error is happening. Look forward to guidance on what to do next

7:30 AM Project CommsUbik is using the following JDK location when running Gradle:
Using different JDK locations on different processes might cause Gradle to
spawn multiple daemons, for example, by executing Gradle tasks from a terminal
while using Android Studio.
More info…
Select a JDK
Do not show this warning again

7:30 AM Gradle sync failed: Sync failed: reason unknown (2 s 339 ms)