Android Studio部署到应用引擎

时间:2015-01-24 00:53:59

标签: google-app-engine android-studio backend

我无法使用Android Studio部署我的webapp。它给出错误com.google.android.gcm.server does not exist 如何解决这个问题呢 ? (在eclipse中我能够轻松部署它)

在后端:

import com.google.android.gcm.server.Message;
import com.google.android.gcm.server.MulticastResult;
import com.google.android.gcm.server.Result;
import com.google.android.gcm.server.Sender;

后端build.gradle

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

应用build.gradle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:+'
    compile project(path: ':backend', configuration: 'android-endpoints')

}

错误信息:

error: package com.google.android.gcm.server does not exist

1 个答案:

答案 0 :(得分:1)

将以下行添加到后端的build.gradle文件中。

compile 'com.ganyo:gcm-server:1.0.2'