where is com.google.android.gcm.GCMBaseIntentService?

android, google-cloud-messaging

Solution

You have to install the libraries: http://developer.android.com/guide/google/gcm/gs.html#libs

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.

Problem

I'm following the tutorial on GCM here http://developer.android.com/guide/google/gcm/gs.html At point 5 of Step 2, it says: Add the following intent service: service android:name=".GCMIntentService" This intent service will be called by the GCMBroadcastReceiver (which is is provided by GCM library), as shown in the next step. It must be a subclass of `com.google.android.gcm.GCMBaseIntentService`, must contain a public constructor, and should be named `my_app_package.GCMIntentService` (unless you use a subclass of `GCMBroadcastReceiver` that overrides the method used to name the service). However, I can't subclass `com.google.android.gcm.GCMBaseIntentService`, the import can't be resolved. How do I fix this?

Original source