GCM: java.lang.noclassdeffounderror: com.google.android.gcm.GCMRegistrar
Estoy tratando de registrar un dispositivo en GCM usando el siguiente código:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
GCMRegistrar.checkDevice(this);
// the following function can be removed when deploying the app
GCMRegistrar.checkManifest(this);
final String regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
GCMRegistrar.register(this, SENDER_ID);
} else {
Log.v(TAG, "Already registered");
}
He importado importación com.google.android.gcm.GCMRegistrar;
y también agregué GCM.jar a mi camino de compilación en Eclipse que obtuve a través de la descarga de SDK
Por favor ayuda !