简体   繁体   中英

installing appengine backend with google cloud messaging not working

I am trying to install the appengine in Android Studio

During installation I was told to update the version of the appengine and was directed to download a zip file with appenginge version 1.9.24. No instructions on what to do after unzipping the package. It created a folder named appengine-java-sdk-1.9.24.

I saw in my app that it uses the folder C:\\Users....gradle\\appengine-sdk\\appengine-java-sdk-1.9.18 so I copied the new folderto the folder appengine-sdk and changed my gradle to point to this new folder.

Once I build the project I get this error:

Error:A problem occurred configuring project ':app'.> A problem occurred configuring project ':backendQ'.
> Could not resolve all dependencies for configuration ':backendQ:classpath'.
  > Could not find com.google.appengine:gradle-appengine-plugin:1.9.24.
    Searched in the following locations:
        file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/appengine/gradle-appengine-plugin/1.9.24/gradle-appengine-plugin-1.9.24.pom
        file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/appengine/gradle-appengine-plugin/1.9.24/gradle-appengine-plugin-1.9.24.jar
        https://jcenter.bintray.com/com/google/appengine/gradle-appengine-plugin/1.9.24/gradle-appengine-plugin-1.9.24.pom
        https://jcenter.bintray.com/com/google/appengine/gradle-appengine-plugin/1.9.24/gradle-appengine-plugin-1.9.24.jar
    Required by:
        Q:backendQ:unspecified

I also noticed that the configuration under Run->Edit Configuration->backendQ shows that the folder for the App Engine SDK is still 1.9.18. I tried changing it to the new folder 1.9.24 but although it allowed me to change it it did not save it. Once I unchecked the option "Synchronize with build.grade configuration" it saved the change but I do not want it not to be synchronize. I search my whole project for the string 1.9.18 but did not find one.

gradle.build

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.google.appengine:gradle-appengine-plugin:1.9.24'
}
}

repositories {
jcenter();
}

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

sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.24'
compile 'com.google.appengine:appengine-endpoints:1.9.24'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.24'
compile 'javax.servlet:servlet-api:2.5'
}

appengine {
downloadSdk = true
appcfg {
    oauth2 = true
}
endpoints {
    getClientLibsOnBuild = true
    getDiscoveryDocsOnBuild = true
}
}

As of August 13th, 2015. A 1.9.24 version of the appengine gradle plugin has not been released. That's why it's not working. You can either wait for that release OR you can set the plugin version to 1.9.23

buildscript {
  repositories {
    jcenter()
  } 
  dependencies {
    classpath 'com.google.appengine:gradle-appengine-plugin:1.9.23'
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM