Gradle DSL method not found android() during AndroidServiceExample build

I believe this to be user error, from someone new & confused.

I have the same problem in 2.4, 2.7 and the new 2.8-rc-2 I assume its me, and its really simple.

I am on Android-Studio 1.5 jre/jdk oracle 8.0, new SDK, JDK and building for 19 for 4.4.2 platform

I am simply trying to get a service example to build.

     Thanks, Bradshaw

Without seeing your build.gradle this is just a guess, I think you’re probably using an old version of the Android Gradle plugin. You can find which version is being used by finding this block in build.gradle:

buildscript {
    repositories {

    dependencies {
        classpath ''

1.3.1 is the latest release version. If your example is using an older version, you might have to migrate parts of the build script: