Frage

I m working on Mac, with Android Studio. I m trying to build a Android App with a Google App Engine BackEnd. I've installed Maven and Gradel and exported the M2_HOME et GRADLE_HOME

Whenever I run any of the Gradle commends I get this :

Error:(21, 0) Gradle: A problem occurred evaluating project ':backend'. Plugin with id 'appengine' not found.

the Build.gradle file :

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
    }
}

repositories {
    mavenCentral()
}

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'

sourceCompatibility = 1.7
targetCompatibility = 1.7

dependencies {
    appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.3'
    compile 'javax.servlet:servlet-api:2.5'
    compile 'com.googlecode.objectify:objectify:5.0.+'
    compile 'com.google.guava:guava:16.0.+'
}

appengine {
  downloadSdk = true
  appcfg {
    oauth2 = true
  }
}
War es hilfreich?

Lösung

From description on plugin github page you need to define plugin JAR file in the classpath of your build script.

So here is how it can be done:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.google.appengine:gradle-appengine-plugin:1.9.3'
    }
}
....
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top