I am getting the following build error when I try and sync my project:
Error:(9, 0) Gradle DSL method not found: \'compile()\'
Possible causes:The project \
Saw reports that the problem occurred for other reasons, but this solved for me.
If you carry out any changes in the Project Structure (Android Studio) and press OK, Gradle will be synchronized, but this type of synchronization, if the dependency block has something like:

This block will stay this way after synchronization:

One way to solve the problem is to insert a line break to stay as it was before the synchronization or put a semi-colon between the two statements.
I hope it helps.