I'm trying to create a GCM Demo Application for Android on Windows 7 following the "official" tutorial (http://developer.android.com/google/gcm/demo.html).
In particular, I am trying to create a server using Java App Engine as described in said tutorial:
To set up the server using a standard App Engine for Java:
From the SDK Manager, install Extras > Google Cloud Messaging for Android Library. This creates a gcm directory under YOUR_SDK_ROOT/extras/google/ containing these subdirectories: gcm-client, gcm-server, samples/gcm-demo-client, samples/gcm-demo-server, and samples/gcm-demo-appengine.
In a text editor, edit samples/gcm-demo-appengine/src/com/google/android/gcm/demo/server/ApiKeyInitializer.java and replace the existing text with the API key obtained above.
Note: The API key value set in that class will be used just once to create a persistent entity on App Engine. If you deploy the application, you can use App Engine's Datastore Viewer to change it later.
In a shell window, go to the samples/gcm-demo-appengine directory.
Start the development App Engine server by ant runserver, using the -Dsdk.dir to indicate the location of the App Engine SDK and -Dserver.host to set your server's hostname or IP address:
$ ant -Dsdk.dir=/opt/google/appengine-java-sdk runserver -Dserver.host=192.168.1.10 Buildfile: gcm-demo-appengine/build.xml
I have followed these steps, and I get the following error:
C:\Users\p\AppData\Local\Android\android-sdk\extras\google\gcm\samples\gcm-demo-appengine>ant -Dsdk.dir C:/Users/p/appengine-java-sdk-1.8.0 runserver -Dserver.host=192.168.44.1 Buildfile: gcm-demo-appengine/build.xml
Buildfile: C:\Users\p\AppData\Local\Android\android-sdk\extras\google\gcm\samples\gcm-demo-appengine\build.xml
init:
copyjars:
compile:
[javac] Compiling 8 source files to C:\Users\p\AppData\Local\Android\android-sdk\extras\google\gcm\samples\gcm-demo-appengine\WebContent\WEB-INF\classes
[javac] C:\Users\p\AppData\Local\Android\android-sdk\extras\google\gcm\samples\gcm-demo-appengine\src\com\google\android\gcm\demo\serer\ApiKeyInitializer.java:1: reached end of file while parsing
[javac] AIzbSyBQdFestseFygh7Q22dxEfdsyc_k->
[javac] ^
[javac] 1 error
BUILD FAILED
"reached end of file while parsing" - as I understand it, this error is normally caused by missing brackets - however, all I've done is edit the ApiKeyInitializer.java file in Notepad to enter the API key; I have not touched any code! I have tried to find a solution online, but to no avail.
Does anyone know what might be causing this issue and how I could fix it? Many thanks in advance!