studio notification google gcm fcm change java android ant google-cloud-messaging

java - google - push notifications android



Problemas al construir la aplicaciĆ³n del Servidor de DemostraciĆ³n GCM (1)

Nunca he ejecutado este proyecto yo mismo, pero parece que le faltan las bibliotecas de extras / google / gcm / gcm-server / dist / gcm-server.jar y sus dependencias. Añádalos a la carpeta libs en este proyecto y vuelva a intentarlo.

Cada vez que intento construir el servidor de demostración de GCM a partir de la documentación que utiliza ant , obtengo 17 errores de compilación. Parece que faltan algunas bibliotecas de GCM. ¿Cómo puedo resolver estos problemas?

Errors: Buildfile: build.xml init: compile: [javac] Compiling 7 source files to /root/gcm/samples/gcm-demo-server/build/classes [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:18: package com.google.android.gcm.server does not exist [javac] import com.google.android.gcm.server.Constants; [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:19: package com.google.android.gcm.server does not exist [javac] import com.google.android.gcm.server.Message; [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:20: package com.google.android.gcm.server does not exist [javac] import com.google.android.gcm.server.MulticastResult; [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:21: package com.google.android.gcm.server does not exist [javac] import com.google.android.gcm.server.Result; [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:22: package com.google.android.gcm.server does not exist [javac] import com.google.android.gcm.server.Sender; [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:46: cannot find symbol [javac] symbol : class Sender [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet [javac] private Sender sender; [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:59: cannot find symbol [javac] symbol : class Sender [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet [javac] protected Sender newSender(ServletConfig config) { [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:62: cannot find symbol [javac] symbol : class Sender [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet [javac] return new Sender(key); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:81: cannot find symbol [javac] symbol : class Message [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet [javac] Message message = new Message.Builder().build(); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:81: package Message does not exist [javac] Message message = new Message.Builder().build(); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:82: cannot find symbol [javac] symbol : class Result [javac] location: class com.google.android.gcm.demo.server.SendAllMessagesServlet [javac] Result result = sender.send(message, registrationId, 5); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:115: cannot find symbol [javac] symbol: class Message [javac] Message message = new Message.Builder().build(); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:115: package Message does not exist [javac] Message message = new Message.Builder().build(); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:116: cannot find symbol [javac] symbol: class MulticastResult [javac] MulticastResult multicastResult; [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:123: cannot find symbol [javac] symbol: class Result [javac] List<Result> results = multicastResult.getResults(); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:127: cannot find symbol [javac] symbol: class Result [javac] Result result = results.get(i); [javac] ^ [javac] /root/gcm/samples/gcm-demo-server/src/com/google/android/gcm/demo/server/SendAllMessagesServlet.java:140: cannot find symbol [javac] symbol: variable Constants [javac] if (error.equals(Constants.ERROR_NOT_REGISTERED)) { [javac] ^ [javac] 17 errors BUILD FAILED