I got the error when i create a new Project using android studio. below i attached a screenshots of error message..
If Android Studio offers you to choose home folder for gradle, just choose "Use customizable gradle". Then, if you see only gradle files, but no classes and resources - click on "Synchronize gradle" and it will be alrigth. Hope this helps