GCM: java.lang.noclassdeffounderror: com.google.android.gcm.GCMRegistrar

Próbuję zarejestrować urządzenie w GCM przy użyciu następującego kodu:

    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");
    } 

Zaimportowałem import com.google.android.gcm.GCMRegistrar;
a także dodał GCM.jar do mojego buildpath w Eclipse, który dostałem przez sdk download

Proszę pomóż !

questionAnswers(10)

yourAnswerToTheQuestion