title: GCM : java.lang.noclassdeffounderror: com.google.android.gcm.GCMRegistrar
body: <p>I am trying to register a device onto GCM using the following code:</p>
  
  <pre><code>    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");
      } 
  </code></pre>
  
  <p>I have imported import com.google.android.gcm.GCMRegistrar;
  <br>and also added GCM.jar to my buildpath in Eclipse which i got thru the sdk download<br></p>
  
  <p>Please help !</p>