In Android Studio, go in Tools > Android > SDK Manager and update all from the tabs “SDK Platforms” and “SDK Tools”
It’s a specific problem in Android Studio, and it’s hard to know all the solutions about problems from another software, but here are some links to some other users and the solutions they have found:
http://stackoverflow.com/questions/29808199/error-running-android-gradle-project-sync-failed-please-fix-your-project-and-t
http://stackoverflow.com/questions/24778598/error-running-myactivity-gradle-project-sync-failed-please-fix-your-project-an
It seems the second answer has fixed the problem for many users:
1. File -> Invalidate caches / Restart
2. Shutdown Android Studio
3. Rename/remove .gradle folder in the user home directory
4. Restart Android Studio let it download all the Gradle stuff it needs
5. Gradle build success !
6. Rebuild project…. success !