 <p>The issue was in the dependencies of the gradle.build file. </p> <p>Changed the following lines in gradle.build from:</p> <pre><code>dependencies { groovy 'org.codehaus.groovy:groovy:2.2.2' ... </code></pre> <p>to:</p> <pre><code>dependencies { groovy 'org.codehaus.groovy:groovy-all:2.2.2' ... </code></pre> <p>This resolved the issue.</p>